mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #29727 -- Made nonexistent joins in F() raise FieldError.
Regression in 2162f0983d.
This commit is contained in:
committed by
Tim Graham
parent
aa16ec5474
commit
f315d0423a
@@ -595,6 +595,10 @@ class BasicExpressionsTests(TestCase):
|
||||
with self.assertRaisesMessage(FieldError, "Cannot resolve keyword 'nope' into field."):
|
||||
list(Employee.objects.filter(firstname=F('nope')))
|
||||
|
||||
def test_incorrect_joined_field_in_F_expression(self):
|
||||
with self.assertRaisesMessage(FieldError, "Cannot resolve keyword 'nope' into field."):
|
||||
list(Company.objects.filter(ceo__pk=F('point_of_contact__nope')))
|
||||
|
||||
|
||||
class IterableLookupInnerExpressionsTests(TestCase):
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user