You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/03/12 21:48:04 UTC

[6/9] git commit: [#7208] ticket:556 Don't call self.admins() multiple times

[#7208] ticket:556 Don't call self.admins() multiple times


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d1a4a8c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d1a4a8c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d1a4a8c9

Branch: refs/heads/master
Commit: d1a4a8c93c40f7c57d034a0c709a04601075d0f4
Parents: 2fcf7ee
Author: Igor Bondarenko <je...@gmail.com>
Authored: Mon Mar 10 20:21:27 2014 +0200
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Mar 12 20:47:55 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d1a4a8c9/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index b2a6dff..541ccbe 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1043,7 +1043,8 @@ class Project(MappedClass, ActivityNode, ActivityObject):
             ET.SubElement(award, 'beer:awardedAt').text = a.granted_by_neighborhood.name
 
         # Maintainers
-        for u in self.admins():
+        admins = self.admins()
+        for u in admins:
             person = ET.SubElement(project, 'maintainer')
             person = ET.SubElement(person, 'foaf:Person', {
                 'xmlns:foaf': "http://xmlns.com/foaf/0.1/",
@@ -1053,7 +1054,7 @@ class Project(MappedClass, ActivityNode, ActivityObject):
             ET.SubElement(person, 'foaf:homepage', {'rdf:resource': h.absurl(u.url())})
 
         # Developers
-        devs = [u for u in self.users_with_role('Developer') if u not in self.admins()]
+        devs = [u for u in self.users_with_role('Developer') if u not in admins]
         for u in devs:
             person = ET.SubElement(project, 'developer')
             person = ET.SubElement(person, 'foaf:Person', {