Fixed tester pages hangs on accept click 03/44203/1
authorIdan Amit <ia096e@intl.att.com>
Mon, 23 Apr 2018 15:43:58 +0000 (18:43 +0300)
committerIdan Amit <ia096e@intl.att.com>
Mon, 23 Apr 2018 15:44:50 +0000 (18:44 +0300)
Fixed an issue regarding the pubsub mechanism

Change-Id: I12a90e5a9d0e046f23ea57c457618b646b72b2e4
Issue-ID: SDC-1247
Signed-off-by: Idan Amit <ia096e@intl.att.com>
catalog-ui/src/app/utils/change-lifecycle-state-handler.ts

index f1c6544..143c3c5 100644 (file)
@@ -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 => {