From 4a45ae0016fe04ce4ace3ec13898c8c653ae3427 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 25 Sep 2018 10:44:56 +0200 Subject: [PATCH] value might not be a string --- pandora/item/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 8249cd6e..01d7632d 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -1030,7 +1030,7 @@ class Item(models.Model): value = self.get(source) set_value(s, name, value) elif sort_type == 'date': - value = self.get(source) + value = value_ = self.get(source) if isinstance(value, string_types): value_ = None for fmt in ('%Y-%m-%d', '%Y-%m', '%Y'):