mirror of
https://github.com/django/django.git
synced 2025-11-01 12:25:37 +00:00
Fixed #16856 - Added a way to clear select_related.
Thanks Carl for the suggestion and David Cramer for the patch.
This commit is contained in:
parent
616f3c4a79
commit
5074c75a37
4 changed files with 21 additions and 1 deletions
|
|
@ -172,3 +172,7 @@ class SelectRelatedTests(TestCase):
|
|||
Species.objects.select_related,
|
||||
'genus__family__order', depth=4
|
||||
)
|
||||
|
||||
def test_none_clears_list(self):
|
||||
queryset = Species.objects.select_related('genus').select_related(None)
|
||||
self.assertEqual(queryset.query.select_related, False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue