From: elinuxhenrik Date: Thu, 15 Apr 2021 08:56:28 +0000 (+0200) Subject: Fix edit problem in PolicyInstanceComponent X-Git-Tag: 2.2.0~29 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F5890%2F2;p=portal%2Fnonrtric-controlpanel.git Fix edit problem in PolicyInstanceComponent Change-Id: I2c5708a0228c765f31b4f3b77d5b117d3b44f950 Issue-ID: NONRTRIC-472 Signed-off-by: elinuxhenrik --- diff --git a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts index 53ab8b1..1649d39 100644 --- a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts +++ b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.ts @@ -154,14 +154,11 @@ export class PolicyInstanceComponent implements OnInit { } modifyInstance(instance: PolicyInstance): void { - let refreshedInstance: PolicyInstance; this.policySvc .getPolicyInstance(instance.policy_id) - .subscribe((refreshedJson: any) => { - refreshedInstance = refreshedJson; + .subscribe((refreshedJson: PolicyInstance) => { + this.openInstanceDialog(refreshedJson); }); - - this.openInstanceDialog(refreshedInstance); } private openInstanceDialog(policy: PolicyInstance) {