Skip to content

Commit e67a913

Browse files
bmclaughlinclaude
authored andcommitted
Fix cross-repo search tag filter for ArrayField
The tags field on CollectionVersion is now an ArrayField instead of a ForeignKey to Tag model. Update filter_by_tags to use the contains lookup which is appropriate for ArrayFields. Issue: AAP-53522 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 11632ac commit e67a913

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pulp_ansible/app/galaxy/v3/filters.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,4 @@ def filter_by_tags(self, qs, name, value):
187187
Returns:
188188
Queryset of CollectionVersion that matches all tags
189189
"""
190-
for tag in value.split(","):
191-
qs = qs.filter(collection_version__tags__name=tag)
192-
return qs
190+
return qs.filter(collection_version__tags__contains=value.split(","))

0 commit comments

Comments
 (0)