From b55a2ee9eaa1a78c5684a1190d61be6c1ce40f56 Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Sun, 1 May 2016 20:45:47 +0300 Subject: [PATCH] fix 2 --- functions/custom_fields.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/functions/custom_fields.py b/functions/custom_fields.py index ead09aa4..615a7e52 100644 --- a/functions/custom_fields.py +++ b/functions/custom_fields.py @@ -273,12 +273,7 @@ class MonthMultiSelectField(models.CharField): with TimeEncoding(locale) as encoding: if not isinstance(cls._saved_month_names, list): cls._saved_month_names = list(month_name) - try: - # python 2.7.6 - m = cls._saved_month_names[month_num].decode(encoding) - except (TypeError, ): - # python 2.7.3 - m = cls._saved_month_names[month_num] + m = cls._saved_month_names[month_num].decode(encoding or 'utf-8') return m @classmethod