1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +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:
Tim Graham
2013-05-30 11:05:42 -04:00
parent 616f3c4a79
commit 5074c75a37
4 changed files with 21 additions and 1 deletions

View File

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