Skip to content

Commit

Permalink
ckan/lib/dictization/model_dictize.py
Browse files Browse the repository at this point in the history
redo    ee42568
  • Loading branch information
FuhuXia committed Oct 21, 2015
1 parent b8d7f36 commit 3ef9f1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan/lib/dictization/model_dictize.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def get_group_dataset_counts():
query = search.PackageSearchQuery()
q = {'q': '+capacity:public',
'fl': 'groups', 'facet.field': ['groups', 'owner_org'],
'fq': '-collection_package_id:["" TO *]',
'facet.limit': -1, 'rows': 1}
query.run(q)
return query.facets
Expand Down Expand Up @@ -395,6 +396,7 @@ def get_packages_for_this_group(group_, just_the_count=False):
q['fq'] = 'owner_org:"{0}"'.format(group_.id)
else:
q['fq'] = 'groups:"{0}"'.format(group_.name)
q['fq'] += ' +-collection_package_id:["" TO *]'

# Allow members of organizations to see private datasets.
if group_.is_organization:
Expand Down

0 comments on commit 3ef9f1b

Please sign in to comment.