diff --git a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts index 66594e6a9c..5ed19aace9 100644 --- a/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts +++ b/console/src/app/modules/policies/private-labeling-policy/private-labeling-policy.component.ts @@ -309,7 +309,7 @@ export class PrivateLabelingPolicyComponent implements OnDestroy { } private handleFontUploadPromise(task: Promise): Promise { - return task.then(() => { + const enhTask = task.then(() => { this.toast.showInfo('POLICY.TOAST.UPLOADSUCCESS', true); setTimeout(() => { this.getPreviewData().then(data => { @@ -319,6 +319,12 @@ export class PrivateLabelingPolicyComponent implements OnDestroy { }); }, 1000); }).catch(error => this.toast.showError(error)); + + if (this.serviceType === PolicyComponentServiceType.MGMT && ((this.previewData as LabelPolicy.AsObject).isDefault)) { + return this.savePolicy().then(() => enhTask); + } else { + return enhTask; + } } private handleUploadPromise(task: Promise): Promise {