Skip to content

Commit

Permalink
[#3016] Bugfix make sure named routes are available
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Nov 15, 2012
1 parent a36817b commit 1c47a94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ckan/config/environment.py
Expand Up @@ -173,6 +173,7 @@ def find_controller(self, controller):
search.check_solr_schema_version()

config['routes.map'] = routing.make_map()
config['routes.named_routes'] = routing.named_routes
config['pylons.app_globals'] = app_globals.app_globals
# initialise the globals
config['pylons.app_globals']._init()
Expand Down
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Expand Up @@ -416,7 +416,7 @@ def build_nav(menu_item, title, **kw):


def _make_menu_item(menu_item, title, **kw):
_menu_items = config['routes.menu_item_data']
_menu_items = config['routes.named_routes']
if menu_item not in _menu_items:
raise Exception('menu item `%s` cannot be found' % menu_item)
item = copy.copy(_menu_items[menu_item])
Expand Down

0 comments on commit 1c47a94

Please sign in to comment.