Skip to content

Commit

Permalink
[#1664] Convert group names to ids in group_activity_list()
Browse files Browse the repository at this point in the history
This fixes a bug where calling group_activity_list with the group's name
as the id parameter would return less results than if you called it with
the group's id.
  • Loading branch information
Sean Hammond committed Oct 29, 2012
1 parent 306d9c3 commit 952ec8e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/logic/action/get.py
Expand Up @@ -1762,7 +1762,11 @@ def group_activity_list(context, data_dict):
model = context['model']
group_id = _get_or_bust(data_dict, 'id')

_check_access('group_show',context, data_dict)
# Convert group_id (could be id or name) into id.
group_show = logic.get_action('group_show')
group_id = group_show(context, {'id': group_id})['id']

_check_access('group_show', context, data_dict)

# Get a list of the IDs of the group's datasets.
group_package_show = logic.get_action('group_package_show')
Expand Down

0 comments on commit 952ec8e

Please sign in to comment.