Skip to content

Commit

Permalink
Switch activity action based on group type.
Browse files Browse the repository at this point in the history
  • Loading branch information
TkTech committed Apr 19, 2017
1 parent 56cc15c commit 437f6d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/controllers/group.py
Expand Up @@ -817,11 +817,15 @@ def activity(self, id, offset=0):
except (NotFound, NotAuthorized):
abort(404, _('Group not found'))

activity_action = 'group_activity_list'
if 'organization' in self.group_types:
activity_action = 'organization_activity_list'

return render(
self._activity_template(group_type),
extra_vars={
'group_type': group_type,
'activity_stream': get_action('organization_activity_list')(
'activity_stream': get_action(activity_action)(
context,
{
'id': c.group_dict['id'],
Expand Down

0 comments on commit 437f6d4

Please sign in to comment.