From b9650a0422583b88dbdf065dfdf1b9dd9256a4dc Mon Sep 17 00:00:00 2001 From: Richard Sustek Date: Tue, 10 Sep 2024 11:57:44 +0200 Subject: [PATCH] Makes taxonomy_group contract prop required --- lib/contracts/contracts.ts | 2 +- lib/mappers/element.mapper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/contracts/contracts.ts b/lib/contracts/contracts.ts index ce88d028..02507667 100644 --- a/lib/contracts/contracts.ts +++ b/lib/contracts/contracts.ts @@ -67,7 +67,7 @@ export namespace Contracts { name: string; type: string; value: any; - taxonomy_group?: string; + taxonomy_group: string; } export interface IDateTimeElementContract extends IElementContract { diff --git a/lib/mappers/element.mapper.ts b/lib/mappers/element.mapper.ts index 7351ebe8..d0a8700a 100644 --- a/lib/mappers/element.mapper.ts +++ b/lib/mappers/element.mapper.ts @@ -307,7 +307,7 @@ export class ElementMapper { private mapTaxonomyElement(elementWrapper: ElementModels.IElementWrapper): Elements.TaxonomyElement { return { ...this.buildElement(elementWrapper, ElementType.Taxonomy, () => elementWrapper.rawElement.value), - taxonomyGroup: elementWrapper.rawElement.taxonomy_group ?? null + taxonomyGroup: elementWrapper.rawElement.taxonomy_group }; }