cast list values to str, just in case

This commit is contained in:
j 2021-02-05 10:07:14 +01:00
parent b377956a13
commit 7d8b38e627

View file

@ -1022,7 +1022,7 @@ class Item(models.Model):
elif sort_type == 'string': elif sort_type == 'string':
value = self.get(source, '') value = self.get(source, '')
if isinstance(value, list): if isinstance(value, list):
value = ','.join(value) value = ','.join([str(v) for v in value])
value = utils.sort_string(value)[:955] value = utils.sort_string(value)[:955]
set_value(s, name, value) set_value(s, name, value)
elif sort_type == 'words': elif sort_type == 'words':