From 632cbc8c39628d2fba0e496ac0fe57eddf12ef5e Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 22 Oct 2019 20:13:53 +0200 Subject: [PATCH] Cast to unicode string in TrimmedString This fixes https://github.com/galaxyproject/galaxy/issues/8680 --- lib/galaxy/model/custom_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/model/custom_types.py b/lib/galaxy/model/custom_types.py index 7bc4b6b3c41..cdd376286fa 100644 --- a/lib/galaxy/model/custom_types.py +++ b/lib/galaxy/model/custom_types.py @@ -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