incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [06/50] git commit: [#6541] Revert to exact match on import_id and fix ImportIdConverter docstring
Date Tue, 17 Sep 2013 19:57:33 GMT
[#6541] Revert to exact match on import_id and fix ImportIdConverter docstring

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/cj/6422
Commit: 44b2a36672d086a9175806a91622edcbe231ae1c
Parents: 59a395d
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Fri Sep 6 17:56:55 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Sep 9 20:27:30 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/plugin.py               | 4 ++--
 ForgeTracker/forgetracker/tracker_main.py | 9 ++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/44b2a366/Allura/allura/lib/plugin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 3376034..8e24cb2 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -955,10 +955,10 @@ class ImportIdConverter(object):
 
     To provide a new converter, expose an entry point in setup.py:
 
-        [allura.tickets.import_id_converter]
+        [allura.import_id_converter]
         mysource = foo.bar:SourceIdConverter
 
-    Then in your .ini file, set tickets.import_id_converter=mysource
+    Then in your .ini file, set import_id_converter=mysource
     '''
 
     @classmethod

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/44b2a366/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 3afdb15..61f7a99 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -1196,11 +1196,10 @@ class TicketController(BaseController, FeedController):
             self.ticket = TM.Ticket.query.get(app_config_id=c.app.config._id,
                                                     ticket_num=self.ticket_num)
             if self.ticket is None:
-                query = {'app_config_id': c.app.config._id}
-                import_id = ImportIdConverter.get().expand(ticket_num, c.app)
-                if import_id:
-                    query.update({'import_id.%s' % k: v for k,v in import_id.iteritems()})
-                self.ticket = TM.Ticket.query.get(**query)
+                self.ticket = TM.Ticket.query.get(
+                        app_config_id = c.app.config._id,
+                        import_id = ImportIdConverter.get().expand(ticket_num, c.app),
+                    )
                 if self.ticket is not None:
                     utils.permanent_redirect(self.ticket.url())
                 else:


Mime
View raw message