diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx index b0c354513..25a72b3c9 100644 --- a/apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx @@ -17,9 +17,7 @@ import { Input } from "@/components/ui/input"; import { api } from "@/utils/api"; const PreferenceSchema = z.object({ - Spread: z.object({ - SpreadDescriptor: z.string(), - }), + SpreadDescriptor: z.string(), }); const PlatformSchema = z.object({ @@ -116,7 +114,14 @@ export const PlacementForm = ({ id, type }: PlacementFormProps) => { mysqlId: id || "", mariadbId: id || "", mongoId: id || "", - placementSwarm: hasAnyValue ? formData : null, + placementSwarm: hasAnyValue + ? { + ...formData, + Preferences: formData.Preferences?.map((p) => ({ + Spread: { SpreadDescriptor: p.SpreadDescriptor }, + })), + } + : null, }); toast.success("Placement updated successfully"); diff --git a/biome.json b/biome.json index a1d1d6bee..b39d20fa6 100644 --- a/biome.json +++ b/biome.json @@ -1,6 +1,7 @@ { "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "files": { + "ignoreUnknown": true, "includes": [ "**", "!**/.docker",