diff options
author | Ryan Petrello <lists@ryanpetrello.com> | 2012-03-11 16:46:57 -0700 |
---|---|---|
committer | Ryan Petrello <lists@ryanpetrello.com> | 2012-03-11 16:46:57 -0700 |
commit | 097e38d55e5a2c6b8ea646c59879b8aa093a7056 (patch) | |
tree | dfece15481b4cb75565a6fa593cf1f3a8f637bce /pecan/rest.py | |
parent | 07f49576ec74ff4aafa235217d4fde8703c7278e (diff) | |
download | pecan-097e38d55e5a2c6b8ea646c59879b8aa093a7056.tar.gz |
Fixing a RESTController routing bug.
Diffstat (limited to 'pecan/rest.py')
-rw-r--r-- | pecan/rest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pecan/rest.py b/pecan/rest.py index b25d5b9..0452d0f 100644 --- a/pecan/rest.py +++ b/pecan/rest.py @@ -109,14 +109,14 @@ class RestController(object): def _handle_get(self, method, remainder): # route to a get_all or get if no additional parts are available - if not remainder: + if not remainder or remainder == ['']: controller = self._find_controller('get_all', 'get') if controller: return controller, [] abort(404) - # check for new/edit/delete GET requests method_name = remainder[-1] + # check for new/edit/delete GET requests if method_name in ('new', 'edit', 'delete'): if method_name == 'delete': method_name = 'get_delete' |