Skip to content

Commit

Permalink
Merge pull request #4769 from usingsky/fix_group_redirect
Browse files Browse the repository at this point in the history
Facet filtering does not work in 'group.read' or 'organization.read' pages
  • Loading branch information
Konstantin Sivakov committed May 15, 2019
2 parents f95316f + 1b3f1c3 commit d67edf7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ckan/views/group.py
Expand Up @@ -466,8 +466,12 @@ def read(group_type, is_organization, id=None, limit=20):
# if the user specified a group id, redirect to the group name
if data_dict['id'] == group_dict['id'] and \
data_dict['id'] != group_dict['name']:
return h.redirect_to(u'{}.read'.format(group_type),
id=group_dict['name'])

url_with_name = h.url_for(u'{}.read'.format(group_type),
id=group_dict['name'])

return h.redirect_to(
h.add_url_param(alternative_url=url_with_name))

# TODO: Remove
# ckan 2.9: Adding variables that were removed from c object for
Expand Down

0 comments on commit d67edf7

Please sign in to comment.