Skip to content

Commit

Permalink
Fix galaxy collection endpoint results for empty repos
Browse files Browse the repository at this point in the history
  • Loading branch information
awcrosby authored and fao89 committed Oct 7, 2020
1 parent 02c1ffb commit 95091e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/7669.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix galaxy collection endpoint results for empty repos
3 changes: 3 additions & 0 deletions pulp_ansible/app/galaxy/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def get_queryset(self):
if not value or semantic_version.Version(version) > semantic_version.Version(value):
collection_versions[str(collection_id)] = version

if not collection_versions.items():
return CollectionVersion.objects.none()

query_params = Q()
for collection_id, version in collection_versions.items():
query_params |= Q(collection_id=collection_id, version=version)
Expand Down

0 comments on commit 95091e7

Please sign in to comment.