Skip to content

Commit

Permalink
- Fix an issue on catalogue APIs when looking for Public Groups IDs (#…
Browse files Browse the repository at this point in the history
…3356)

*  - Fix an issue on catalogue APIs when looking for Public Groups IDs

* Update views.py
  • Loading branch information
Alessio Fabiani authored and simod committed Oct 24, 2017
1 parent 3804b44 commit df45056
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion geonode/catalogue/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ def csw_global_dispatch(request):

public_groups = GroupProfile.objects.exclude(access="private").values('group')
for group in public_groups:
groups_ids.append(group.id)
if isinstance(group, dict):
if 'group' in group:
groups_ids.append(group['group'])
else:
groups_ids.append(group.id)

if len(groups_ids) > 0:
groups = "(" + (", ".join(str(e) for e in groups_ids)) + ")"
Expand Down

0 comments on commit df45056

Please sign in to comment.