Fix saving issue caused by using isNew instead of getIsNew
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user