From 5a5f1b351976736ce4a3c55cfdd81067fccf97f1 Mon Sep 17 00:00:00 2001 From: ewandor Date: Fri, 17 Mar 2023 15:15:53 +0100 Subject: [PATCH] Correcting foreignKey not updated on update --- front/app/src/common/crud/card/card.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/app/src/common/crud/card/card.component.ts b/front/app/src/common/crud/card/card.component.ts index 2c8624e2..3d78445b 100644 --- a/front/app/src/common/crud/card/card.component.ts +++ b/front/app/src/common/crud/card/card.component.ts @@ -112,10 +112,10 @@ export class CardComponent implements OnInit { model._id = this.resource_id; this.crudService.update(this.resource!, model).subscribe( { next: (model: any) => { - this.model = model; - this._modelLoading$.next(false); this.resourceUpdated.emit(model._id); this.resourceReceived.emit(model); + this.model = model; + this._modelLoading$.next(false); }, error: (err) => this.error.emit("Error updating the entity:" + err) });