mirror of
https://github.com/django/django.git
synced 2025-11-01 12:25:37 +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:
parent
5171f56fae
commit
67732a9b18
7 changed files with 31 additions and 13 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue