1
0
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:
Tim Graham
2015-10-09 21:03:04 -04:00
parent 5171f56fae
commit 67732a9b18
7 changed files with 31 additions and 13 deletions

View File

@@ -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):