Fixed lookup.tests.LookupTests.test_exact_none_transform() test on Oracle.
NulledTransform doesn't return TextField anymore so it cannot be
wrapped with DBMS_LOB.SUBSTR().
Test regression in
@@ -50,11 +50,22 @@ class NulledTextField(models.TextField):
return None if value == "" else value
+class NullField(models.Field):
+ pass
+
+
+NullField.register_lookup(IsNull)
+
+
@NulledTextField.register_lookup
class NulledTransform(models.Transform):
lookup_name = "nulled"
template = "NULL"
+ @property
+ def output_field(self):
+ return NullField()
+
@NulledTextField.register_lookup
class IsNullWithNoneAsRHS(IsNull):
