Skip to content

Commit

Permalink
[#2955] Fix group feeds returning no datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 26, 2016
1 parent efa7ae6 commit 481efa4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ckan/controllers/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,17 @@ def _alternate_url(self, params, **kwargs):
def _group_or_organization(self, obj_dict, is_org):

data_dict, params = self._parse_url_params()
key = 'owner_org' if is_org else 'groups'
data_dict['fq'] = '%s:"%s"' % (key, obj_dict['id'],)
group_type = 'organization'
if not is_org:
if is_org:
key = 'owner_org'
value = obj_dict['id']
group_type = 'organization'
else:
key = 'groups'
value = obj_dict['name']
group_type = 'group'

data_dict['fq'] = '{0}:"{1}"'.format(key, value)

item_count, results = _package_search(data_dict)

navigation_urls = self._navigation_urls(params,
Expand Down

0 comments on commit 481efa4

Please sign in to comment.