mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #24687 -- Added select_related() validation for nested non-relational fields.
The removed test was added in the original select_related() validation
patch (45d4e43d2d), but there doesn't
seem to be any reason for it.
Thanks Claude Paroz for help and review.
This commit is contained in:
@@ -36,7 +36,7 @@ class ChildAdmin(admin.ModelAdmin):
|
||||
list_filter = ['parent', 'age']
|
||||
|
||||
def get_queryset(self, request):
|
||||
return super(ChildAdmin, self).get_queryset(request).select_related("parent__name")
|
||||
return super(ChildAdmin, self).get_queryset(request).select_related("parent")
|
||||
|
||||
|
||||
class CustomPaginationAdmin(ChildAdmin):
|
||||
|
||||
Reference in New Issue
Block a user