mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 14:44:18 +00:00
Fixes 500 error on search
The class SnapshotAdmin search_fields includes the tags ManyToMany field causing a django.core.exceptions.FieldError: Related Field got invalid lookup: icontains error. A related search field tags__name should be used.
This commit is contained in:
parent
4372cb6eec
commit
8b0250caeb
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ class SnapshotAdmin(admin.ModelAdmin):
|
|||
list_display = ('added', 'title_str', 'url_str', 'files', 'size')
|
||||
sort_fields = ('title_str', 'url_str', 'added')
|
||||
readonly_fields = ('id', 'url', 'timestamp', 'num_outputs', 'is_archived', 'url_hash', 'added', 'updated')
|
||||
search_fields = ('url', 'timestamp', 'title', 'tags')
|
||||
search_fields = ['url', 'timestamp', 'title', 'tags__name']
|
||||
fields = (*readonly_fields, 'title', 'tags')
|
||||
list_filter = ('added', 'updated', 'tags')
|
||||
ordering = ['-added']
|
||||
|
|
Loading…
Reference in a new issue