diff --git a/anki/sync.py b/anki/sync.py index 9667a42e6..8ab7db759 100644 --- a/anki/sync.py +++ b/anki/sync.py @@ -532,6 +532,9 @@ class FullSyncer(HttpSyncer): def upload(self): runHook("sync", "upload") + # make sure it's ok before we try to upload + assert self.col.db.scalar("pragma integrity_check") == "ok" + # apply some adjustments, then upload self.col.beforeUpload() assert self.req("upload", open(self.col.path, "rb")) == "OK"