summaryrefslogtreecommitdiffstats
path: root/pykolab
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-05-04 16:01:20 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-05-04 16:01:20 +0200
commit61e53980ae71511f4c538252a571e8cd54eb0712 (patch)
treea37e80cac542f18046a928761828399bacc13291 /pykolab
parentf63162347c6f33e1e3db9c49fa154de821dd828d (diff)
downloadpykolab-61e53980ae71511f4c538252a571e8cd54eb0712.tar.gz
Fix encoding errors also for cache updates (#5143)
Summary: The fix in a9aa9c2650 missed encoding conversion for UPDATE queries Reviewers: #pykolab_developers, vanmeeuwen Reviewed By: #pykolab_developers, vanmeeuwen Differential Revision: https://git.kolab.org/D138
Diffstat (limited to 'pykolab')
-rw-r--r--pykolab/auth/ldap/auth_cache.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/auth_cache.py b/pykolab/auth/ldap/auth_cache.py
index 2449cae..781f7b9 100644
--- a/pykolab/auth/ldap/auth_cache.py
+++ b/pykolab/auth/ldap/auth_cache.py
@@ -139,6 +139,9 @@ def set_entry(key, value):
db.commit()
elif len(_entries) == 1:
+ if not isinstance(value, unicode):
+ value = unicode(value, 'utf-8')
+
if not _entries[0].value == value:
_entries[0].value = value