fix: ignore random periodicity in validations
(cherry picked from commit 3d3655ed73)
This commit is contained in:
committed by
mergify-bot
parent
ae8c1ae311
commit
62bbf0fe45
@@ -47,7 +47,7 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
"Yearly": 365
|
"Yearly": 365
|
||||||
}
|
}
|
||||||
for item in self.items:
|
for item in self.items:
|
||||||
if item.periodicity and item.start_date:
|
if item.periodicity and item.periodicity != "Random" and item.start_date:
|
||||||
if not item.end_date:
|
if not item.end_date:
|
||||||
if item.no_of_visits:
|
if item.no_of_visits:
|
||||||
item.end_date = add_days(item.start_date, item.no_of_visits * days_in_period[item.periodicity])
|
item.end_date = add_days(item.start_date, item.no_of_visits * days_in_period[item.periodicity])
|
||||||
|
|||||||
Reference in New Issue
Block a user