Few fixes before release 1.3.0 (#13791)

This commit is contained in:
Charles Bochet
2025-08-09 03:08:11 +02:00
committed by GitHub
parent 1916333eac
commit b55c46f4a3
13 changed files with 106 additions and 85 deletions
@@ -5,7 +5,7 @@ import {
type BeforeUpdateOneHook,
type UpdateOneInputType,
} from '@ptc-org/nestjs-query-graphql';
import { type APP_LOCALES, SOURCE_LOCALE } from 'twenty-shared/translations';
import { SOURCE_LOCALE, type APP_LOCALES } from 'twenty-shared/translations';
import { isDefined } from 'twenty-shared/utils';
import {
@@ -188,6 +188,9 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
throw new FieldMetadataException(
'Unique field cannot have a default value',
FieldMetadataExceptionCode.INVALID_FIELD_INPUT,
{
userFriendlyMessage: t`Unique field cannot have a default value`,
},
);
}
@@ -832,6 +835,9 @@ export class FieldMetadataService extends TypeOrmQueryService<FieldMetadataEntit
throw new FieldMetadataException(
'Unique field cannot have a default value',
FieldMetadataExceptionCode.INVALID_FIELD_INPUT,
{
userFriendlyMessage: t`Unique field cannot have a default value`,
},
);
if (fieldMetadataInput.isUnique !== true) return;