mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-17 05:21:49 -05:00
Extend SmartFilter to expand search and related search fields
This commit is contained in:
@@ -293,12 +293,7 @@ class ListAPIView(generics.ListAPIView, GenericAPIView):
|
||||
|
||||
@property
|
||||
def search_fields(self):
|
||||
fields = []
|
||||
for field in self.model._meta.fields:
|
||||
if field.name in ('username', 'first_name', 'last_name', 'email',
|
||||
'name', 'description'):
|
||||
fields.append(field.name)
|
||||
return fields
|
||||
return get_search_fields(self.model)
|
||||
|
||||
@property
|
||||
def related_search_fields(self):
|
||||
|
||||
Reference in New Issue
Block a user