diff --git a/ckan/views/group.py b/ckan/views/group.py index 4e94ade34f9..71f304d3ca9 100644 --- a/ckan/views/group.py +++ b/ckan/views/group.py @@ -466,10 +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']: + + url_with_name = h.url_for(u'{}.read'.format(group_type), + id=group_dict['name']) + return h.redirect_to( - h.add_url_param( - controller=group_type, action=u'read', - extras=dict(id=group_dict['name']))) + h.add_url_param(alternative_url=url_with_name)) # TODO: Remove # ckan 2.9: Adding variables that were removed from c object for