mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-18 06:38:19 +01:00
Merge pull request #7715 from pureshine/cannot-save
Fix unable to save after entering invalid cron and then switching back to other schedules
This commit is contained in:
commit
3604765d8a
@ -73,12 +73,15 @@ export class CronScheduleComponent implements OnChanges {
|
||||
}
|
||||
|
||||
save(): void {
|
||||
if (this.scheduleType === SCHEDULE_TYPE.CUSTOM && this.cronString === '') {
|
||||
this.dateInvalid = true;
|
||||
}
|
||||
if (this.dateInvalid) {
|
||||
return;
|
||||
if (this.scheduleType === SCHEDULE_TYPE.CUSTOM ) {
|
||||
if (this.cronString === '') {
|
||||
this.dateInvalid = true;
|
||||
}
|
||||
if (this.dateInvalid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let scheduleTerm: string = "";
|
||||
if (this.scheduleType && this.scheduleType === SCHEDULE_TYPE.NONE) {
|
||||
scheduleTerm = "";
|
||||
|
Loading…
Reference in New Issue
Block a user