From 4dfd4ac67f81ba9d92299e0561afbb579be067a5 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Mon, 26 Nov 2012 15:48:23 +0100 Subject: [PATCH 1/2] fix _proper_unicode --- openslides/utils/utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openslides/utils/utils.py b/openslides/utils/utils.py index d8f054eb0..4c787687a 100644 --- a/openslides/utils/utils.py +++ b/openslides/utils/utils.py @@ -142,12 +142,10 @@ def ajax_request(data): def _propper_unicode(text): - res = '' if not isinstance(text, unicode): - res = u"%s" % text.decode('UTF-8') + return u"%s" % text.decode('UTF-8') else: - res = text - return res + return text def decodedict(dict): From e7c47395bbd5dab21c3614e4f0dd5756c8e2d260 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Tue, 27 Nov 2012 22:46:54 +0100 Subject: [PATCH 2/2] Gave the empty user all the attributes it needs --- openslides/utils/person/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openslides/utils/person/__init__.py b/openslides/utils/person/__init__.py index e262022b4..430f04c91 100644 --- a/openslides/utils/person/__init__.py +++ b/openslides/utils/person/__init__.py @@ -21,7 +21,7 @@ __all__ = ['receive_persons', 'generate_person_id', 'get_person', 'Person', 'PersonField', 'PersonMixin', 'EmptyPerson'] -class EmptyPerson(PersonMixin): +class EmptyPerson(PersonMixin, Person): @property def person_id(self): return 'empty'