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:
parent
05d70fb92b
commit
1e4da43955
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user