mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02:30
Merge pull request #5047 from AlanCoding/related_m2m_search
include m2m fields in related search options
This commit is contained in:
@@ -285,6 +285,10 @@ class ListAPIView(generics.ListAPIView, GenericAPIView):
|
|||||||
if name.endswith('_set'):
|
if name.endswith('_set'):
|
||||||
continue
|
continue
|
||||||
fields.append('{}__search'.format(name))
|
fields.append('{}__search'.format(name))
|
||||||
|
for relationship in self.model._meta.local_many_to_many:
|
||||||
|
if relationship.related_model._meta.app_label != 'main':
|
||||||
|
continue
|
||||||
|
fields.append('{}__search'.format(relationship.name))
|
||||||
return fields
|
return fields
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user