diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts index 973106b774..905e6a92e7 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.spec.ts @@ -184,11 +184,13 @@ describe('createUpdatedTranslatable()', () => { it('coerces empty customFields to correct type', () => { const customFieldConfig: CustomFieldConfig[] = [ - { name: 'a', type: 'boolean', list: false }, - { name: 'b', type: 'int', list: false }, - { name: 'c', type: 'float', list: false }, - { name: 'd', type: 'datetime', list: false }, - { name: 'e', type: 'string', list: false }, + { name: 'a', type: 'boolean', list: false, nullable: false }, + { name: 'b', type: 'int', list: false, nullable: false }, + { name: 'c', type: 'float', list: false, nullable: false }, + { name: 'd', type: 'datetime', list: false, nullable: false }, + { name: 'e', type: 'string', list: false, nullable: false }, + { name: 'f', type: 'int', list: false, nullable: true }, + { name: 'g', type: 'datetime', list: false, nullable: true }, ]; const formValue = { @@ -198,6 +200,8 @@ describe('createUpdatedTranslatable()', () => { c: '', d: '', e: '', + f: '', + g: '', }, }; @@ -213,5 +217,7 @@ describe('createUpdatedTranslatable()', () => { expect(result.customFields.c).toBe(0); expect(result.customFields.d instanceof Date).toBe(true); expect(result.customFields.e).toBe(''); + expect(result.customFields.f).toBe(null); + expect(result.customFields.g).toBe(null); }); }); diff --git a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.ts b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.ts index 69009754ec..340133e100 100644 --- a/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.ts +++ b/packages/admin-ui/src/lib/core/src/common/utilities/create-updated-translatable.ts @@ -39,7 +39,9 @@ export function createUpdatedTranslatable