mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #26001 -- Fixed non-string field exact lookups in ModelAdmin.search_fields.
This commit is contained in:
@@ -48,6 +48,7 @@ class ChildAdmin(admin.ModelAdmin):
|
||||
list_display = ["name", "parent"]
|
||||
list_per_page = 10
|
||||
list_filter = ["parent", "age"]
|
||||
search_fields = ["age__exact", "name__exact"]
|
||||
|
||||
def get_queryset(self, request):
|
||||
return super().get_queryset(request).select_related("parent")
|
||||
|
||||
Reference in New Issue
Block a user