Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed empty strings + to_field regression on Oracle

Querying the reverse side of nullable to_field relation, where both
sides can contain null values resulted in incorrect results. The reason
was not detecting '' as NULL.

Refs #17541
  • Loading branch information...
commit 09fcb70c804b76fccc8fc0ac545873e5ab30c00a 1 parent 60fff6f
Anssi Kääriäinen authored February 23, 2013
5  django/db/models/fields/related.py
... ...
@@ -1,6 +1,6 @@
@@ -496,7 +496,8 @@ def get_query_set(self):
2  tests/regressiontests/many_to_one_regress/tests.py
@@ -126,7 +126,7 @@ def test_relation_unsaved(self):
126 126
         # Now the model is saved, so we will need to execute an query.
127 127
         with self.assertNumQueries(1):
128 128
             self.assertEqual(th.child_set.count(), 0)
129  
-    
  129
+
130 130
     def test_related_null_to_field(self):
131 131
         c1 = Car.objects.create()
132 132
         c2 = Car.objects.create()

0 notes on commit 09fcb70

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