Skip to content

Commit

Permalink
[#1384] Update related controller to use a list
Browse files Browse the repository at this point in the history
The controller relied on the output of related_list being a
Query object. Updated them to use the list.
  • Loading branch information
nigelbabu committed Dec 17, 2013
1 parent e552048 commit d2693b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/controllers/related.py
Expand Up @@ -40,7 +40,7 @@ def dashboard(self):
base.abort(400, ('"page" parameter must be an integer'))

# Update ordering in the context
query = logic.get_action('related_list')(context, data_dict)
related_list = logic.get_action('related_list')(context, data_dict)

def search_url(params):
url = h.url_for(controller='related', action='dashboard')
Expand All @@ -55,10 +55,10 @@ def pager_url(q=None, page=None):
return search_url(params)

c.page = h.Page(
collection=query.all(),
collection=related_list,
page=page,
url=pager_url,
item_count=query.count(),
item_count=len(related_list),
items_per_page=9
)

Expand Down

0 comments on commit d2693b8

Please sign in to comment.