Try normalizing the dbcore String type

Strings were not being normalized, unlike some other types, leading to
downstream problems like #3773.
This commit is contained in:
Adrian Sampson 2020-10-18 07:19:21 -04:00
parent 52ca0cbfde
commit a63ee0e1a7

View file

@ -207,6 +207,12 @@ class String(Type):
sql = u'TEXT'
query = query.SubstringQuery
def normalize(self, value):
if value is None:
return self.model_type()
else:
return self.model_type(value)
class Boolean(Type):
"""A boolean type.