fix: ensure syncStatus is reset to 'synced' for unchanged files in Advoware sync process
This commit is contained in:
@@ -333,13 +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')
|
||||
now_str = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
updates['lastSyncTimestamp'] = now_str
|
||||
|
||||
needs_update = len(updates) > 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user