incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [6/9] git commit: [#7208] ticket:556 Don't call self.admins() multiple times
Date Wed, 12 Mar 2014 20:48:04 GMT
[#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 <jetmind2@gmail.com>
Authored: Mon Mar 10 20:21:27 2014 +0200
Committer: Cory Johns <cjohns@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', {


Mime
View raw message