From 6aee6cf454b1611a466ea4c24aa87030a0c20e46 Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Tue, 31 Mar 2026 13:30:10 +0200 Subject: [PATCH] fix: CLI sync downloads tables with empty hash (not yet computed) Empty server hash was matching empty local hash, skipping all tables. Now treats empty hash or missing local entry as 'needs download'. --- cli/commands/sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/commands/sync.py b/cli/commands/sync.py index ae31674..b4da0f1 100644 --- a/cli/commands/sync.py +++ b/cli/commands/sync.py @@ -52,7 +52,9 @@ def sync( if docs_only: continue local_hash = local_tables.get(tid, {}).get("hash", "") - if info.get("hash", "") != local_hash: + server_hash = info.get("hash", "") + # Download if: hashes differ, or no local copy, or hash is empty (not computed) + if server_hash != local_hash or tid not in local_tables or not server_hash: to_download.append(tid) progress.update(task, description=f"Found {len(to_download)} tables to sync")