mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 20:24:36 -05:00
Fix Effective Date Range cannot be removed
This commit is contained in:
parent
8f449ab738
commit
45ef7b2f69
@ -18,10 +18,13 @@ class Maintenance extends BeanModel {
|
|||||||
let dateRange = [];
|
let dateRange = [];
|
||||||
if (this.start_date) {
|
if (this.start_date) {
|
||||||
dateRange.push(this.start_date);
|
dateRange.push(this.start_date);
|
||||||
|
} else {
|
||||||
|
dateRange.push(null);
|
||||||
|
}
|
||||||
|
|
||||||
if (this.end_date) {
|
if (this.end_date) {
|
||||||
dateRange.push(this.end_date);
|
dateRange.push(this.end_date);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let timeRange = [];
|
let timeRange = [];
|
||||||
let startTime = parseTimeObject(this.start_time);
|
let startTime = parseTimeObject(this.start_time);
|
||||||
@ -155,10 +158,14 @@ class Maintenance extends BeanModel {
|
|||||||
|
|
||||||
if (obj.dateRange[0]) {
|
if (obj.dateRange[0]) {
|
||||||
bean.start_date = obj.dateRange[0];
|
bean.start_date = obj.dateRange[0];
|
||||||
|
} else {
|
||||||
|
bean.start_date = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (obj.dateRange[1]) {
|
if (obj.dateRange[1]) {
|
||||||
bean.end_date = obj.dateRange[1];
|
bean.end_date = obj.dateRange[1];
|
||||||
}
|
} else {
|
||||||
|
bean.end_date = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bean.strategy === "cron") {
|
if (bean.strategy === "cron") {
|
||||||
|
Loading…
Reference in New Issue
Block a user