Skip to content

Commit

Permalink
fix remove_field in dateset page
Browse files Browse the repository at this point in the history
  • Loading branch information
usingsky committed Jun 1, 2019
1 parent a09c288 commit 7289988
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/views/dataset.py
Expand Up @@ -84,13 +84,15 @@ def drill_down_url(alternative_url=None, **by):


def remove_field(package_type, key, value=None, replace=None):
if not package_type or package_type == u'dataset':
url = h.url_for(u'dataset.search')
else:
url = h.url_for(u'{0}_search'.format(package_type))
return h.remove_url_param(
key,
value=value,
replace=replace,
controller=u'dataset',
action=u'search',
alternative_url=package_type
alternative_url=url
)


Expand Down

0 comments on commit 7289988

Please sign in to comment.