diff --git a/monitor/services/stakeholder.service.ts b/monitor/services/stakeholder.service.ts index 2618e425..f8cfc260 100644 --- a/monitor/services/stakeholder.service.ts +++ b/monitor/services/stakeholder.service.ts @@ -92,6 +92,9 @@ export class StakeholderService { } buildStakeholder(url: string, stakeholder: Stakeholder): Observable { + if(stakeholder.alias && stakeholder.alias.startsWith('/')) { + stakeholder.alias = stakeholder.alias.slice(1); + } return this.http.post(url + '/build-stakeholder', stakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => { return this.formalize(this.checkIsUpload(stakeholder)); })); @@ -102,6 +105,9 @@ export class StakeholderService { } saveElement(url: string, element: any, path: string[] = []): Observable { + if(element.alias && element.alias.startsWith('/')) { + element.alias = element.alias.slice(1); + } path = HelperFunctions.encodeArray(path); return this.http.post(url + ((path.length > 0) ? '/' : '') + path.join('/') + '/save', element, CustomOptions.registryOptions()).pipe(map(element => {