1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

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 09ffc5c121.
This commit is contained in:
Mariusz Felisiak 2022-12-16 12:24:49 +01:00 committed by GitHub
parent 05d70fb92b
commit 1e4da43955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):