From 0bd397803e8aa00828bebbd72ee55d2036192d1c Mon Sep 17 00:00:00 2001 From: bsiggel Date: Tue, 31 Mar 2026 07:14:52 +0000 Subject: [PATCH] fix: reset syncStatus to 'synced' when file is confirmed in-sync in AdvowareDocumentSyncUtils --- services/advoware_document_sync_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/advoware_document_sync_utils.py b/services/advoware_document_sync_utils.py index 00c75f1..0af8c35 100644 --- a/services/advoware_document_sync_utils.py +++ b/services/advoware_document_sync_utils.py @@ -333,6 +333,10 @@ class AdvowareDocumentSyncUtils: if history_erstellung and history_erstellung != espo_erstellung: updates['advowareErstellungTimestamp'] = history_erstellung + # File is confirmed in-sync (SKIP = no file changes) → reset syncStatus if unclean + if espo_doc.get('syncStatus') != 'synced': + updates['syncStatus'] = 'synced' + # Always update lastSyncTimestamp when metadata changes (EspoCRM format) if len(updates) > 0: updates['lastSyncTimestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')