1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-04 21:15:19 +02:00

Auto sync preference, max limit on account CSV imports (#2259)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

* Auto sync preference, max limit on account CSV imports

* MaxRowCountExceededError
This commit is contained in:
Zach Gollwitzer 2025-05-18 15:02:51 -04:00 committed by GitHub
parent f82f77466a
commit e26e5c5aec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 35 additions and 1 deletions

View file

@ -13,6 +13,7 @@ module AutoSync
def family_needs_auto_sync?
return false unless Current.family&.accounts&.active&.any?
return false if (Current.family.last_sync_created_at&.to_date || 1.day.ago) >= Date.current
return false unless Current.family.auto_sync_on_login
Rails.logger.info "Auto-syncing family #{Current.family.id}, last sync was #{Current.family.last_sync_created_at}"

View file

@ -5,6 +5,8 @@ class ImportsController < ApplicationController
@import.publish_later
redirect_to import_path(@import), notice: "Your import has started in the background."
rescue Import::MaxRowCountExceededError
redirect_back_or_to import_path(@import), alert: "Your import exceeds the maximum row count of #{@import.max_row_count}."
end
def index