fix: allow scheduled Apple Health mirrors

This commit is contained in:
muhdusama committed 2026-09-20 00:26:05 +10:00
1 parent c183d1862e
commit 30e454fb83
2 files changed
+26 -1

No files matched your search

@@ -228,7 +228,10 @@ export const createMedicationSchema = z
path: ["asNeeded"],
})
.refine(
(b) => b.asNeeded === true || (!!b.schedules && b.schedules.length >= 1),
(b) =>
b.externalSource === "APPLE_HEALTH" ||
b.asNeeded === true ||
(!!b.schedules && b.schedules.length >= 1),
{
message: "Mindestens ein Zeitfenster",
path: ["schedules"],