summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2016-09-17 04:25:00 -0300
committerdrebs <drebs@leap.se>2016-12-12 09:11:58 -0200
commit2f7dc19efc8b89820cb44ed8b0b9cb225555d446 (patch)
treed88d555e93edbff9cfbc43f114888be5ed5c85b7 /server/src
parent01625647c291a90b72a5c5caa9793fbf0d98a8f7 (diff)
[bug] use an empty string to represent tumbstones
If a doc doesnt have a content it means it was deleted. Sync stream was unable to represent this state.
Diffstat (limited to 'server/src')
-rw-r--r--server/src/leap/soledad/server/sync.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/sync.py b/server/src/leap/soledad/server/sync.py
index 253139a9..77d4b840 100644
--- a/server/src/leap/soledad/server/sync.py
+++ b/server/src/leap/soledad/server/sync.py
@@ -251,7 +251,8 @@ class SyncResource(http_app.SyncResource):
entry = dict(id=doc.doc_id, rev=doc.rev,
gen=gen, trans_id=trans_id)
self.responder.stream_entry(entry)
- self.responder.stream_entry(doc.get_json().read())
+ content = doc.get_json()
+ self.responder.stream_entry(content.read() if content else '')
new_gen, number_of_changes = \
self.sync_exch.find_changes_to_return(received)