end_date有可能是null
This commit is contained in:
parent
026768323e
commit
1d33e33263
|
@ -280,7 +280,9 @@ class Event
|
||||||
end
|
end
|
||||||
tmp_start_date = [start_date, @start_date].max
|
tmp_start_date = [start_date, @start_date].max
|
||||||
@start_date += add_interval
|
@start_date += add_interval
|
||||||
|
if @end_date
|
||||||
@end_date += add_interval
|
@end_date += add_interval
|
||||||
|
end
|
||||||
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
|
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
|
||||||
need_check_hide = false
|
need_check_hide = false
|
||||||
if tmp_hide_start.count != 0
|
if tmp_hide_start.count != 0
|
||||||
|
@ -315,7 +317,7 @@ class Event
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
if new_start != org_start
|
if new_start != org_start
|
||||||
new_end = @end_date + w.day
|
new_end = @end_date ? @end_date + w.day : nil
|
||||||
hide = need_check_hide && tmp_hide_start2.include?(new_start.strftime("%Y-%m-%d"))
|
hide = need_check_hide && tmp_hide_start2.include?(new_start.strftime("%Y-%m-%d"))
|
||||||
if hide
|
if hide
|
||||||
if preserve_hide
|
if preserve_hide
|
||||||
|
@ -340,8 +342,10 @@ class Event
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@start_date += interval
|
@start_date += interval
|
||||||
|
if @end_date
|
||||||
@end_date += interval
|
@end_date += interval
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue