mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #21204 -- Tracked field deferrals by field instead of models.
This ensures field deferral works properly when a model is involved more than once in the same query with a distinct deferral mask.
This commit is contained in:
parent
5d12650ed9
commit
b3db6c8dcb
6 changed files with 121 additions and 126 deletions
|
@ -3594,12 +3594,6 @@ class WhereNodeTest(SimpleTestCase):
|
|||
|
||||
|
||||
class QuerySetExceptionTests(SimpleTestCase):
|
||||
def test_iter_exceptions(self):
|
||||
qs = ExtraInfo.objects.only("author")
|
||||
msg = "'ManyToOneRel' object has no attribute 'attname'"
|
||||
with self.assertRaisesMessage(AttributeError, msg):
|
||||
list(qs)
|
||||
|
||||
def test_invalid_order_by(self):
|
||||
msg = "Cannot resolve keyword '*' into field. Choices are: created, id, name"
|
||||
with self.assertRaisesMessage(FieldError, msg):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue