diff options
author | drebs <drebs@leap.se> | 2014-08-04 16:48:21 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-08-08 11:49:03 -0300 |
commit | afdb1cefe605cabfe325df3124b9beb3174568ff (patch) | |
tree | ddfd62a861a1bd6c035d60ef9222eb18102e6cc9 /client/src/leap/soledad/client/target.py | |
parent | 30aa5c040c093aa82be09e94dd403c18597320e5 (diff) |
Delete the received docs from sync db before starting a new sync.
Diffstat (limited to 'client/src/leap/soledad/client/target.py')
-rw-r--r-- | client/src/leap/soledad/client/target.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/target.py b/client/src/leap/soledad/client/target.py index 12175f48..1cb02856 100644 --- a/client/src/leap/soledad/client/target.py +++ b/client/src/leap/soledad/client/target.py @@ -1149,8 +1149,9 @@ class SoledadSyncTarget(HTTPSyncTarget, TokenBasedAuth): setProxiedObject(self._insert_doc_cb[source_replica_uid], return_doc_cb) + # empty the database before starting a new sync if defer_decryption is True and not self.clear_to_sync(): - raise PendingReceivedDocsSyncError + self._sync_decr_pool.empty() self._ensure_connection() if self._trace_hook: # for tests |