From 5e4444610cc9512f544d05f425a9e312dddd42dc Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 24 Aug 2025 06:33:36 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- .../volume-backups/handle-volume-backups.tsx | 8 ++++---- packages/server/src/utils/volume-backups/utils.ts | 10 ++++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx index 09ba71839..feb99175b 100644 --- a/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx +++ b/apps/dokploy/components/dashboard/application/volume-backups/handle-volume-backups.tsx @@ -55,8 +55,7 @@ const formSchema = z cronExpression: z.string().min(1, "Cron expression is required"), volumeName: z.string().min(1, "Volume name is required"), prefix: z.string(), - keepLatestCount: z - .coerce + keepLatestCount: z.coerce .number() .int() .gte(1, "Must be at least 1") @@ -188,7 +187,8 @@ export const HandleVolumeBackups = ({ serviceType: volumeBackup.serviceType, }); setKeepLatestCountInput( - volumeBackup.keepLatestCount !== null && volumeBackup.keepLatestCount !== undefined + volumeBackup.keepLatestCount !== null && + volumeBackup.keepLatestCount !== undefined ? String(volumeBackup.keepLatestCount) : "", ); @@ -203,7 +203,7 @@ export const HandleVolumeBackups = ({ if (!id && !volumeBackupId) return; const preparedKeepLatestCount = - keepLatestCountInput === "" ? null : values.keepLatestCount ?? null; + keepLatestCountInput === "" ? null : (values.keepLatestCount ?? null); await mutateAsync({ ...values, diff --git a/packages/server/src/utils/volume-backups/utils.ts b/packages/server/src/utils/volume-backups/utils.ts index 7ee1ccb4d..5b55c240c 100644 --- a/packages/server/src/utils/volume-backups/utils.ts +++ b/packages/server/src/utils/volume-backups/utils.ts @@ -1,7 +1,13 @@ import { findVolumeBackupById } from "@dokploy/server/services/volume-backups"; import { scheduledJobs, scheduleJob } from "node-schedule"; -import { createDeploymentVolumeBackup, updateDeploymentStatus } from "@dokploy/server/services/deployment"; -import { execAsync, execAsyncRemote } from "@dokploy/server/utils/process/execAsync"; +import { + createDeploymentVolumeBackup, + updateDeploymentStatus, +} from "@dokploy/server/services/deployment"; +import { + execAsync, + execAsyncRemote, +} from "@dokploy/server/utils/process/execAsync"; import { backupVolume } from "./backup"; import { getS3Credentials, normalizeS3Path } from "../backups/utils";