Bust the cache after import

Without this exporting, deleting and then re-imporing an account would reuse the old cache entries since the IDs are the same, but those cache entries will likely have the old account ID and would break
This commit is contained in:
Stanko K.R.
2026-02-02 15:48:49 +01:00
parent 1bc1b68ddf
commit dca67c59ca
@@ -71,7 +71,9 @@ class Account::DataTransfer::RecordSet
def import_batch(files)
batch_data = files.map do |file|
data = load(file)
data.slice(*attributes).merge("account_id" => account.id)
data.slice(*attributes).merge("account_id" => account.id).tap do |record_data|
record_data["updated_at"] = Time.current if record_data.key?("updated_at")
end
end
model.insert_all!(batch_data)