From 899c9878c44d26de2d0079e403bf74a999a0b18f Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Sun, 1 Mar 2026 19:27:23 -0500 Subject: [PATCH] Fix: only attach invoices if document is updated --- app/services/sync_service_base.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/sync_service_base.rb b/app/services/sync_service_base.rb index dec46e0..b3cfe7c 100644 --- a/app/services/sync_service_base.rb +++ b/app/services/sync_service_base.rb @@ -109,10 +109,10 @@ class SyncServiceBase if local.changed? local.save! log "Updated #{@entity.name} #{remote.id}" - end - # Handle attaching documents if applicable to invoices - attach_documents(local, remote) + # Handle attaching documents if applicable to invoices + attach_documents(local, remote) + end rescue => e log "Failed to sync #{@entity.name} #{remote.id}: #{e.message}"