feat: Optimize initial sync logic and remove redundant rowId updates in sync process
This commit is contained in:
@@ -244,7 +244,12 @@ class BeteiligteSync:
|
||||
last_sync = espo_entity.get('advowareLastSync')
|
||||
espo_modified = espo_entity.get('modifiedAt')
|
||||
|
||||
if espo_rowid and advo_rowid and last_sync:
|
||||
# SPECIAL CASE: Kein lastSync → Initial Sync (EspoCRM→Advoware)
|
||||
if not last_sync:
|
||||
self._log(f"Initial Sync (kein lastSync) → EspoCRM neuer")
|
||||
return 'espocrm_newer'
|
||||
|
||||
if espo_rowid and advo_rowid:
|
||||
# Prüfe ob Advoware geändert wurde (rowId)
|
||||
advo_changed = (espo_rowid != advo_rowid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user