fix(imports): preserve account status from backups (#1603)

This commit is contained in:
ghost
2026-04-30 15:53:55 -06:00
committed by GitHub
parent 43a500d9fa
commit 072f92c715
2 changed files with 51 additions and 1 deletions

View File

@@ -92,7 +92,7 @@ class Family::DataImporter
institution_name: data["institution_name"],
institution_domain: data["institution_domain"],
notes: data["notes"],
status: "active"
status: importable_account_status(data["status"])
)
account.save!
@@ -108,6 +108,10 @@ class Family::DataImporter
end
end
def importable_account_status(status)
status.to_s.in?(%w[active disabled draft]) ? status.to_s : "active"
end
def import_categories(records)
# First pass: create all categories without parent relationships
parent_mappings = {}