incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [09/12] git commit: [#2502] ticket:300 Simplify filtered_by_subscription()
Date Mon, 22 Apr 2013 19:41:25 GMT
[#2502] ticket:300 Simplify filtered_by_subscription()


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

Branch: refs/heads/master
Commit: e843f9fbc1c98e2a88191d974cc872d32be29691
Parents: 201cc53
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Fri Apr 12 11:43:50 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon Apr 22 19:40:27 2013 +0000

----------------------------------------------------------------------
 .../forgetracker/tests/functional/test_root.py     |    4 ++--
 ForgeTracker/forgetracker/tracker_main.py          |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e843f9fb/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 9ccc963..566f534 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -1194,8 +1194,8 @@ class TestFunctionalController(TrackerTestController):
         # test-user-1 - only for second.
         # admin - for both (since he has tool subscription).
         changes = {
-            tickets[0]._id: {'ticket': tickets[0], 'changes': 'Ticket 1 changes'},
-            tickets[1]._id: {'ticket': tickets[1], 'changes': 'Ticket 2 changes'},
+            tickets[0]._id: tickets[0],
+            tickets[1]._id: tickets[1],
         }
         filtered_changes = filtered_by_subscription(changes)
         filtered_users = [uid for uid, data in filtered_changes.iteritems()]

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e843f9fb/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 28c73ac..7ea8693 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1165,8 +1165,8 @@ def filtered_by_subscription(tickets, project_id=None, app_config_id=None):
         if M.Mailbox.subscribed(**params):
             filtered[uid] = ticket_ids  # subscribed to entire tool, will see all changes
             continue
-        for t_id, data in tickets.iteritems():
-            params.update({'artifact': data['ticket']})
+        for t_id, ticket in tickets.iteritems():
+            params.update({'artifact': ticket})
             if M.Mailbox.subscribed(**params):
                 if filtered.get('uid') is None:
                     filtered[uid] = []


Mime
View raw message