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.
This commit is contained in:
Mauricio Siu
2026-02-07 20:06:33 -06:00
parent f4b5a589b6
commit 2532934cdf

View File

@@ -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),