From: Idan Amit Date: Mon, 23 Apr 2018 15:43:58 +0000 (+0300) Subject: Fixed tester pages hangs on accept click X-Git-Tag: v1.2.0~137 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F03%2F44203%2F1;p=sdc.git Fixed tester pages hangs on accept click Fixed an issue regarding the pubsub mechanism Change-Id: I12a90e5a9d0e046f23ea57c457618b646b72b2e4 Issue-ID: SDC-1247 Signed-off-by: Idan Amit --- diff --git a/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts b/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts index f1c6544351..143c3c5360 100644 --- a/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts +++ b/catalog-ui/src/app/utils/change-lifecycle-state-handler.ts @@ -110,6 +110,9 @@ export class ChangeLifecycleStateHandler { component.changeLifecycleState(data.url, comment).then(onSuccess, onError); }); } + else { + component.changeLifecycleState(data.url, comment).then(onSuccess, onError); + } }; let onCancel = ():void => { @@ -135,6 +138,13 @@ export class ChangeLifecycleStateHandler { } }); } + else { + if (resource) { + onSuccess(resource); + } else { + onError("Error changing life cycle state"); + } + } }; let onCancel = ():void => {