fix: Fix Enable Banking sync date determination

This commit is contained in:
Alessio Cappa
2025-11-30 17:58:29 +01:00
parent 4a29d030af
commit 35f4b11872
2 changed files with 6 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ module Syncable
end
def last_synced_at
latest_sync&.completed_at
latest_completed_sync&.completed_at
end
def last_sync_created_at
@@ -68,6 +68,10 @@ module Syncable
syncs.ordered.first
end
def latest_completed_sync
syncs.completed.ordered.first
end
def syncer
self.class::Syncer.new(self)
end

View File

@@ -241,7 +241,7 @@ class EnableBankingItem::Importer
if enable_banking_item.last_synced_at
enable_banking_item.last_synced_at.to_date - 7.days
else
user_start_date || 90.days.ago.to_date
30.days.ago.to_date
end
else
# Initial sync: use user's configured date or default to 3 months