diff --git a/projects/common/src/fm/services/item.service.ts b/projects/common/src/fm/services/item.service.ts index 63d5355..c302639 100644 --- a/projects/common/src/fm/services/item.service.ts +++ b/projects/common/src/fm/services/item.service.ts @@ -154,7 +154,7 @@ export class ItemService { putItemFile(item: IItem, jsonObject: any): Observable { const formData = new FormData(); - const file = new File([JSON.stringify(jsonObject)], 'data.dat', {type: 'application/json'}); + const file = new File([JSON.stringify(jsonObject, undefined, '\t')], 'data.dat', {type: 'application/json'}); formData.append('file', file); return this.httpClient.put(`${this.ApiEndpoint()}/api/v1/items/${item.code}/data`, formData); } diff --git a/projects/common/src/fm/services/itemtype.service.ts b/projects/common/src/fm/services/itemtype.service.ts index cc06612..6887532 100644 --- a/projects/common/src/fm/services/itemtype.service.ts +++ b/projects/common/src/fm/services/itemtype.service.ts @@ -27,7 +27,7 @@ export class ItemTypeService { getExtraAttributes(itemType: string) { let extraAttributes = null; - if (this.itemTypes[itemType]) extraAttributes = this.itemTypes[itemType].extraAttributes; + if (this.itemTypes[itemType] && this.itemTypes[itemType].extraAttributes) extraAttributes = this.itemTypes[itemType].extraAttributes; return extraAttributes; }