From 2532934cdf88c50fae3e4f2ec185ac936a14ec48 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Sat, 7 Feb 2026 20:06:33 -0600 Subject: [PATCH] fix(settings): correct database query syntax in reconnectServicesToTraefik function - Updated the database query in the `reconnectServicesToTraefik` function to remove optional chaining, ensuring proper execution of the query. - This change enhances the reliability of service reconnections to Traefik by ensuring the database connection is correctly utilized. --- packages/server/src/services/settings.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/services/settings.ts b/packages/server/src/services/settings.ts index 60ece860b..f3603a8f0 100644 --- a/packages/server/src/services/settings.ts +++ b/packages/server/src/services/settings.ts @@ -5,7 +5,9 @@ import { execAsyncRemote, } from "@dokploy/server/utils/process/execAsync"; import { and, eq } from "drizzle-orm"; + import semver from "semver"; +import { db } from "../db"; import { compose } from "../db/schema"; import { initializeStandaloneTraefik, @@ -455,7 +457,7 @@ export const writeTraefikSetup = async (input: TraefikOptions) => { }; export const reconnectServicesToTraefik = async (serverId?: string) => { - const composeResult = await db?.query.compose.findMany({ + const composeResult = await db.query.compose.findMany({ where: and( ...(serverId ? [eq(compose.serverId, serverId)] : []), eq(compose.isolatedDeployment, true),