Fix saving issue caused by using isNew instead of getIsNew

This commit is contained in:
Jesper Møller Jensen
2023-12-13 12:33:31 +13:00
parent 5575b74f5d
commit c99b4a96c4
3 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ export class UmbMediaWorkspaceContext
async save() {
if (!this.#data.value) return;
if (this.isNew) {
if (this.getIsNew()) {
await this.repository.create(this.#data.value);
} else {
await this.repository.save(this.#data.value.id, this.#data.value);

View File

@@ -60,7 +60,7 @@ export class UmbMemberTypeWorkspaceContext
if (!this.#data.value) return;
if (!this.#data.value.id) return;
if (this.isNew) {
if (this.getIsNew()) {
await this.repository.create(this.#data.value);
} else {
await this.repository.save(this.#data.value.id, this.#data.value);

View File

@@ -57,7 +57,7 @@ export class UmbRelationTypeWorkspaceContext
if (!this.#data.value) return;
if (!this.#data.value.id) return;
if (this.isNew) {
if (this.getIsNew()) {
await this.repository.create(this.#data.value);
} else {
await this.repository.save(this.#data.value.id, this.#data.value);