mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Merge pull request #5047 from AlanCoding/related_m2m_search
include m2m fields in related search options
This commit is contained in:
commit
9b7ffb59fa
@ -285,6 +285,10 @@ class ListAPIView(generics.ListAPIView, GenericAPIView):
|
||||
if name.endswith('_set'):
|
||||
continue
|
||||
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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user