Remove non positive integer constraint on Nav Menu Item 2/2 (#18090)

Follow up https://github.com/twentyhq/twenty/pull/18081
This commit is contained in:
Etienne
2026-02-19 15:17:25 +01:00
committed by GitHub
parent 37d9828458
commit b3d8f8813f
3 changed files with 10 additions and 13 deletions
@@ -1,6 +1,6 @@
import { Field, InputType, Int } from '@nestjs/graphql';
import { Field, InputType } from '@nestjs/graphql';
import { IsInt, IsOptional, IsString, IsUUID, Min } from 'class-validator';
import { IsNumber, IsOptional, IsString, IsUUID } from 'class-validator';
import { UUIDScalarType } from 'src/engine/api/graphql/workspace-schema-builder/graphql-types/scalars';
@@ -46,9 +46,8 @@ export class CreateNavigationMenuItemInput {
@Field(() => UUIDScalarType, { nullable: true })
folderId?: string;
@IsInt()
@Min(0)
@IsNumber()
@IsOptional()
@Field(() => Int, { nullable: true })
@Field({ nullable: true })
position?: number;
}
@@ -1,13 +1,12 @@
import { Field, InputType, Int } from '@nestjs/graphql';
import { Field, InputType } from '@nestjs/graphql';
import { Type } from 'class-transformer';
import {
IsInt,
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
IsUUID,
Min,
ValidateNested,
} from 'class-validator';
@@ -20,10 +19,9 @@ export class UpdateNavigationMenuItemInput {
@Field(() => UUIDScalarType, { nullable: true })
folderId?: string | null;
@IsInt()
@Min(0)
@IsNumber()
@IsOptional()
@Field(() => Int, { nullable: true })
@Field({ nullable: true })
position?: number;
@IsOptional()