diff --git a/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts b/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts index 069c3399bb..4ee82e9114 100644 --- a/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts +++ b/packages/geo/src/lib/workspace/shared/edition-workspace.service.ts @@ -389,10 +389,13 @@ export class EditionWorkspaceService { this.sanitizeParameter(feature, workspace); + const baseUrl = workspace.layer.dataSource.options.edition.baseUrl; let url = this.configService.getConfig('edition.url'); - if (workspace.layer.dataSource.options.edition.baseUrl) { - url += workspace.layer.dataSource.options.edition.baseUrl; + if (!url) { + url = baseUrl; + } else { + url += baseUrl ? baseUrl : ''; } if (feature.newFeature) { @@ -613,7 +616,8 @@ export class EditionWorkspaceService { getDomainValues(relation: RelationOptions): Observable { let url = relation.url; if (!url) { - url = this.configService.getConfig('edition.url') + relation.table; + url = this.configService.getConfig('edition.url') ? + this.configService.getConfig('edition.url') + relation.table : relation.table; } return this.http.get(url).pipe( diff --git a/packages/geo/src/lib/workspace/shared/edition-workspace.ts b/packages/geo/src/lib/workspace/shared/edition-workspace.ts index bd2f630bc6..dec2e651ab 100644 --- a/packages/geo/src/lib/workspace/shared/edition-workspace.ts +++ b/packages/geo/src/lib/workspace/shared/edition-workspace.ts @@ -123,14 +123,16 @@ export class EditionWorkspace extends Workspace { dialogRef.afterClosed().subscribe(result => { if (result === false) { + let id, url; const baseUrl = workspace.layer.dataSource.options.edition.baseUrl; const deleteUrl = workspace.layer.dataSource.options.edition.deleteUrl; - let id; - let url; - if (baseUrl) { - url = this.configService.getConfig('edition.url') + baseUrl + '?' + deleteUrl; + if (baseUrl.length) { + url = this.configService.getConfig('edition.url') ? + this.configService.getConfig('edition.url') + baseUrl + '?' + deleteUrl : + baseUrl + '?' + deleteUrl; } else { - url = this.configService.getConfig('edition.url') + deleteUrl; + url = this.configService.getConfig('edition.url') ? + this.configService.getConfig('edition.url') + deleteUrl : deleteUrl; } for (const column of workspace.meta.tableTemplate.columns) {