diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2016-09-17 04:25:00 -0300 |
---|---|---|
committer | Victor Shyba <victor1984@riseup.net> | 2016-11-18 15:55:52 -0300 |
commit | 0c17692f7fc110f7fc9467d4537b24849d2bdb95 (patch) | |
tree | f994ba448fc4a1042aaed240e8b3bcba89900463 /server | |
parent | 063ccbc1a3a6ad8be836f344edeed851adbd90d5 (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')
-rw-r--r-- | server/src/leap/soledad/server/sync.py | 3 |
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) |