Skip to content

Open-source status page, incident response and uptime monitoring

fix: nullable (#522)

Maximilian Kaske8f5efd01965d
diff --git a/packages/db/src/schema/shared.ts b/packages/db/src/schema/shared.ts
index 1ec16cd3b..b6b9abec0 100644
--- a/packages/db/src/schema/shared.ts
+++ b/packages/db/src/schema/shared.ts
@@ -34,7 +34,10 @@ export const selectPublicPageSchemaWithRelation = selectPageSchema
.extend({
monitors: z.array(selectPublicMonitorSchema),
statusReports: selectStatusReportPageSchema,
- workspacePlan: workspacePlanSchema.default("free"),
+ workspacePlan: workspacePlanSchema
+ .nullable()
+ .default("free")
+ .transform((val) => val ?? "free"),
})
.omit({
workspaceId: true,