Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added release note and regression test for refs #21643.

This will be backported to stable/1.6.x along with the original fix.
  • Loading branch information...
commit 8137215973c8cf97f58f244021b1a4e75923ade8 1 parent 7c01023
@timgraham timgraham authored
Showing with 11 additions and 0 deletions.
  1. +4 −0 docs/releases/1.6.3.txt
  2. +7 −0 tests/expressions_regress/tests.py
View
4 docs/releases/1.6.3.txt
@@ -14,3 +14,7 @@ several bugs in 1.6.2:
* Fixed ``AttributeError`` when using
:meth:`~django.db.models.query.QuerySet.bulk_create` with ``ForeignObject``
(`#21566 <http://code.djangoproject.com/ticket/21566>`_).
+
+* Fixed crash of ``QuerySet``\s that use ``F() + timedelta()`` when their query
+ was compiled more once
+ (`#21643 <http://code.djangoproject.com/ticket/21643>`_).
View
7 tests/expressions_regress/tests.py
@@ -281,6 +281,13 @@ def test_multiple_query_compilation(self):
q2 = str(queryset.query)
self.assertEqual(q1, q2)
+ def test_query_clone(self):
+ # Ticket #21643
+ qs = Experiment.objects.filter(end__lt=F('start') + datetime.timedelta(hours=1))
+ qs2 = qs.all()
+ list(qs)
+ list(qs2)
+
def test_delta_add(self):
for i in range(len(self.deltas)):
delta = self.deltas[i]

0 comments on commit 8137215

Please sign in to comment.
Something went wrong with that request. Please try again.