Skip to content

Commit

Permalink
Merge pull request #4790 from usingsky/remove_facet_field
Browse files Browse the repository at this point in the history
fix remove_field in dateset page
  • Loading branch information
smotornyuk committed Jul 9, 2019
2 parents 78bcc94 + 7289988 commit 51e4130
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 51e4130

Please sign in to comment.