mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 14:47:38 +01:00
Fix unable to save after entering invalid cron and then switching back to other schedules
Signed-off-by: FangyuanCheng <fangyuanc@vmware.com>
This commit is contained in:
parent
2b5c511c76
commit
a34f99cae4
@ -73,12 +73,15 @@ export class CronScheduleComponent implements OnChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
save(): void {
|
save(): void {
|
||||||
if (this.scheduleType === SCHEDULE_TYPE.CUSTOM && this.cronString === '') {
|
if (this.scheduleType === SCHEDULE_TYPE.CUSTOM ) {
|
||||||
|
if (this.cronString === '') {
|
||||||
this.dateInvalid = true;
|
this.dateInvalid = true;
|
||||||
}
|
}
|
||||||
if (this.dateInvalid) {
|
if (this.dateInvalid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let scheduleTerm: string = "";
|
let scheduleTerm: string = "";
|
||||||
if (this.scheduleType && this.scheduleType === SCHEDULE_TYPE.NONE) {
|
if (this.scheduleType && this.scheduleType === SCHEDULE_TYPE.NONE) {
|
||||||
scheduleTerm = "";
|
scheduleTerm = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user