diff --git a/src/Umbraco.Web.UI.Client/src/packages/settings/relation-types/workspace/relation-type-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/packages/settings/relation-types/workspace/relation-type-workspace.context.ts index f11f17debf..05f75db876 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/settings/relation-types/workspace/relation-type-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/settings/relation-types/workspace/relation-type-workspace.context.ts @@ -57,12 +57,16 @@ export class UmbRelationTypeWorkspaceContext if (!this.#data.value) return; if (!this.#data.value.id) return; + let response = undefined; + if (this.getIsNew()) { - await this.repository.create(this.#data.value); + response = await this.repository.create(this.#data.value); } else { - await this.repository.save(this.#data.value.id, this.#data.value); + response = await this.repository.save(this.#data.value.id, this.#data.value); } + if (response.error) return; + // If it went well, then its not new anymore?. this.setIsNew(false); }