diff options
| author | Alexander Holmbäck <alexande.holmback@creuna.se> | 2018-09-06 20:10:20 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-08 09:40:33 -0400 |
| commit | f315d0423a09dfe20dd4d4f6a0eb11fc8e45a665 (patch) | |
| tree | a9aba4c1f452986f91c7c01e15fc30ac81e60387 /tests | |
| parent | aa16ec54747eaa9da7534e67a1de320b9a517c1c (diff) | |
Fixed #29727 -- Made nonexistent joins in F() raise FieldError.
Regression in 2162f0983de0dfe2178531638ce7ea56f54dd4e7.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expressions/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py index 973176e223..9a646088b1 100644 --- a/tests/expressions/tests.py +++ b/tests/expressions/tests.py @@ -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 |
