Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #11722 -- iexact=F() produced invalid SQL

  • Loading branch information...
commit 193cd097ca8f2cc6a911e57b8e3fb726f96ee6a6 1 parent 08ed3c3
@akaariai akaariai authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 tests/expressions/tests.py
View
7 tests/expressions/tests.py
@@ -224,6 +224,13 @@ def test():
acme.num_employees = F("num_employees") + 16
self.assertRaises(TypeError, acme.save)
+ def test_ticket_11722_iexact_lookup(self):
+ Employee.objects.create(firstname="John", lastname="Doe")
+ Employee.objects.create(firstname="Test", lastname="test")
+
+ queryset = Employee.objects.filter(firstname__iexact=F('lastname'))
+ self.assertQuerysetEqual(queryset, ["<Employee: Test test>"])
+
def test_ticket_18375_join_reuse(self):
# Test that reverse multijoin F() references and the lookup target
# the same join. Pre #18375 the F() join was generated first, and the
Please sign in to comment.
Something went wrong with that request. Please try again.