mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-07 22:27:40 +00:00
fix: create label policy if not exists on font upload (#1898)
This commit is contained in:
parent
fd04fb58d0
commit
ab88d311f3
@ -309,7 +309,7 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handleFontUploadPromise(task: Promise<any>): Promise<any> {
|
private handleFontUploadPromise(task: Promise<any>): Promise<any> {
|
||||||
return task.then(() => {
|
const enhTask = task.then(() => {
|
||||||
this.toast.showInfo('POLICY.TOAST.UPLOADSUCCESS', true);
|
this.toast.showInfo('POLICY.TOAST.UPLOADSUCCESS', true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.getPreviewData().then(data => {
|
this.getPreviewData().then(data => {
|
||||||
@ -319,6 +319,12 @@ export class PrivateLabelingPolicyComponent implements OnDestroy {
|
|||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}).catch(error => this.toast.showError(error));
|
}).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<any>): Promise<any> {
|
private handleUploadPromise(task: Promise<any>): Promise<any> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user