Fix updating a plan

This commit is contained in:
Brandon Presley 2023-11-10 17:09:27 +13:00
parent 83da62b5d9
commit 6810b84310

View File

@ -92,7 +92,7 @@ class _EditPlanPageState extends State<EditPlanPage> {
return; return;
} }
if (plan.id.present) if (plan.id.present)
await db.update(db.plans).write(plan); await db.update(db.plans).replace(plan);
else else
await db.into(db.plans).insert(plan); await db.into(db.plans).insert(plan);
if (!mounted) return; if (!mounted) return;