Skip to content

Commit

Permalink
add the view args to the pager_url function
Browse files Browse the repository at this point in the history
without them it fails and returns a unicode string, which is not valid
  • Loading branch information
alycejenni committed Jun 7, 2019
1 parent c8bfcf3 commit 18c1810
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckanext/gallery/plugins/gallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,11 @@ def setup_template_variables(self, context, data_dict):
return tpl_variables

def pager_url(self, **kwargs):
'''Adds a view id to the kwargs passed to the ckan pager_url function.
'''Adds a view id and the view args to the kwargs passed to the ckan pager_url function.
'''
view_id = toolkit.request.params.get(u'view_id')
view_id = toolkit.request.params.get('view_id')
if view_id:
kwargs[u'view_id'] = view_id
kwargs['view_id'] = str(view_id)
kwargs.update(toolkit.request.view_args)
return toolkit.h.pager_url(**kwargs)

0 comments on commit 18c1810

Please sign in to comment.