mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-26 10:28:37 -06:00
Search/filter by table name
This commit is contained in:
parent
54b7951da0
commit
eede8f110d
@ -355,14 +355,15 @@ class TableConfigFilterSet(ChangeLoggedModelFilterSet):
|
||||
|
||||
class Meta:
|
||||
model = TableConfig
|
||||
fields = ('id', 'name', 'slug', 'description', 'enabled', 'shared', 'weight')
|
||||
fields = ('id', 'name', 'slug', 'description', 'table', 'enabled', 'shared', 'weight')
|
||||
|
||||
def search(self, queryset, name, value):
|
||||
if not value.strip():
|
||||
return queryset
|
||||
return queryset.filter(
|
||||
Q(name__icontains=value) |
|
||||
Q(description__icontains=value)
|
||||
Q(description__icontains=value) |
|
||||
Q(table__icontains=value)
|
||||
)
|
||||
|
||||
def _usable(self, queryset, name, value):
|
||||
|
Loading…
Reference in New Issue
Block a user