mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 17:08:41 -06:00
Filter/search image attachments by filename
This commit is contained in:
parent
84c36a11b4
commit
adb8e53823
@ -458,6 +458,7 @@ class ImageAttachmentFilterSet(ChangeLoggedModelFilterSet):
|
||||
return queryset
|
||||
return queryset.filter(
|
||||
Q(name__icontains=value) |
|
||||
Q(image__icontains=value) |
|
||||
Q(description__icontains=value)
|
||||
)
|
||||
|
||||
|
@ -19,6 +19,7 @@ class ImageAttachmentIndex(SearchIndex):
|
||||
model = models.ImageAttachment
|
||||
fields = (
|
||||
('name', 100),
|
||||
('filename', 110),
|
||||
('description', 500),
|
||||
)
|
||||
display_attrs = ('description',)
|
||||
|
Loading…
Reference in New Issue
Block a user