mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
fix(imports): preserve account status from backups (#1603)
This commit is contained in:
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user