Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: audit logs missing

Gaurav Bhatt4de82d204d10
diff --git a/packages/database/src/audit.ts b/packages/database/src/audit.ts
index 5006c5763a..4b035293ee 100644
--- a/packages/database/src/audit.ts
+++ b/packages/database/src/audit.ts
@@ -269,7 +269,7 @@ export async function isAuditLogEnabled(
.from("company")
.select("auditLogEnabled")
.eq("id", companyId)
- .single();
+ .maybeSingle();
if (error) {
throw new Error(`Failed to check audit log status: ${error.message}`);