mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +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
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue