Merge pull request #8847 from mvdbeek/fix_trimmed_string_implementation

[19.09] Cast to string in TrimmedString
This commit is contained in:
John Chilton
2019-10-23 08:41:46 -04:00
committed by GitHub
+1 -1
View File
@@ -372,5 +372,5 @@ class TrimmedString(TypeDecorator):
def process_bind_param(self, value, dialect):
"""Automatically truncate string values"""
if self.impl.length and value is not None:
value = value[0:self.impl.length]
value = unicodify(value)[0:self.impl.length]
return value