fix: reset syncStatus to 'synced' when file is confirmed in-sync in AdvowareDocumentSyncUtils
This commit is contained in:
@@ -333,6 +333,10 @@ class AdvowareDocumentSyncUtils:
|
|||||||
if history_erstellung and history_erstellung != espo_erstellung:
|
if history_erstellung and history_erstellung != espo_erstellung:
|
||||||
updates['advowareErstellungTimestamp'] = history_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)
|
# Always update lastSyncTimestamp when metadata changes (EspoCRM format)
|
||||||
if len(updates) > 0:
|
if len(updates) > 0:
|
||||||
updates['lastSyncTimestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
updates['lastSyncTimestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||||
|
|||||||
Reference in New Issue
Block a user