Correcting foreignKey not updated on update
This commit is contained in:
@@ -112,10 +112,10 @@ export class CardComponent implements OnInit {
|
|||||||
model._id = this.resource_id;
|
model._id = this.resource_id;
|
||||||
this.crudService.update(this.resource!, model).subscribe( {
|
this.crudService.update(this.resource!, model).subscribe( {
|
||||||
next: (model: any) => {
|
next: (model: any) => {
|
||||||
this.model = model;
|
|
||||||
this._modelLoading$.next(false);
|
|
||||||
this.resourceUpdated.emit(model._id);
|
this.resourceUpdated.emit(model._id);
|
||||||
this.resourceReceived.emit(model);
|
this.resourceReceived.emit(model);
|
||||||
|
this.model = model;
|
||||||
|
this._modelLoading$.next(false);
|
||||||
},
|
},
|
||||||
error: (err) => this.error.emit("Error updating the entity:" + err)
|
error: (err) => this.error.emit("Error updating the entity:" + err)
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user