From 88d47eba6b46526de51144c02c54dea5574f2fb3 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 21 Feb 2018 08:52:22 +0530 Subject: [PATCH] don't decode str --- pandora/entity/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/entity/models.py b/pandora/entity/models.py index 40a343caa..2862896ef 100644 --- a/pandora/entity/models.py +++ b/pandora/entity/models.py @@ -54,7 +54,7 @@ class Entity(models.Model): def save(self, *args, **kwargs): entity = get_by_id(settings.CONFIG['entities'], self.type) if entity.get('sortType') == 'person' and self.name: - if isinstance(self.name, str): + if isinstance(self.name, bytes): self.name = self.name.decode('utf-8') self.name_sort = get_name_sort(self.name)[:255].lower() else: