fix: Update timestamp format for metadata synchronization to match EspoCRM requirements

This commit is contained in:
bsiggel
2026-03-25 21:37:49 +00:00
parent 50c5070894
commit d78a4ee67e
2 changed files with 5 additions and 5 deletions

View File

@@ -320,9 +320,9 @@ class AdvowareDocumentSyncUtils:
if history_hnr is not None and history_hnr != espo_hnr:
updates['hnr'] = history_hnr
# Always update lastSyncTimestamp when metadata changes
# Always update lastSyncTimestamp when metadata changes (EspoCRM format)
if len(updates) > 0:
updates['lastSyncTimestamp'] = datetime.now().isoformat()
updates['lastSyncTimestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
needs_update = len(updates) > 0

View File

@@ -240,8 +240,8 @@ async def handler(event_data: Dict[str, Any], ctx: FlowContext) -> None:
# Extract full Windows path from watcher data
full_path = windows_file.get('path', '')
# Current timestamp for sync tracking
now_iso = datetime.now().isoformat()
# Current timestamp for sync tracking (EspoCRM format)
now_iso = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
new_doc = await espocrm.create_entity('CDokumente', {
'name': filename,
@@ -285,7 +285,7 @@ async def handler(event_data: Dict[str, Any], ctx: FlowContext) -> None:
# Update document in EspoCRM with correct field names
ctx.logger.info(f"💾 Updating document in EspoCRM...")
now_iso = datetime.now().isoformat()
now_iso = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
update_data = {
'blake3hash': blake3_hash,