diff --git a/tests/lookup/models.py b/tests/lookup/models.py index 86f774ea11..9bb3412c33 100644 --- a/tests/lookup/models.py +++ b/tests/lookup/models.py @@ -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):