mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 02:22:25 +01:00
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:
parent
52ca0cbfde
commit
a63ee0e1a7
1 changed files with 6 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue