summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-11-21 11:02:39 -0300
committerTomás Touceda <chiiph@leap.se>2013-11-21 11:02:39 -0300
commitd2f161e3efda601bccfc390392302f665f8a644b (patch)
tree3ace11d4b4276c86856f3e9b96080410f366ca9b /client
parentc17fe773748e6d07941016f608c6e7cfea0b043c (diff)
parent69fd3a11a3821468e737b8fb0e3e77abef0a4b8a (diff)
Merge remote-tracking branch 'drebs/bug/4095_add-unicode-conversion-to-put_doc' into develop
Diffstat (limited to 'client')
-rw-r--r--client/src/leap/soledad/client/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py
index d50dde42..62f93b3d 100644
--- a/client/src/leap/soledad/client/__init__.py
+++ b/client/src/leap/soledad/client/__init__.py
@@ -747,12 +747,20 @@ class Soledad(object):
"""
Update a document in the local encrypted database.
+ ============================== WARNING ==============================
+ This method converts the document's contents to unicode in-place. This
+ meanse that after calling C{put_doc(doc)}, the contents of the
+ document, i.e. C{doc.content}, might be different from before the
+ call.
+ ============================== WARNING ==============================
+
:param doc: the document to update
:type doc: SoledadDocument
:return: the new revision identifier for the document
:rtype: str
"""
+ doc.content = self._convert_to_unicode(doc.content)
return self._db.put_doc(doc)
def delete_doc(self, doc):