commit | 3d3655ed730f793ddac24d610da397741ffc3009 | [log] [tgz] |
---|---|---|
author | Ankush Menat <ankush@iwebnotes.com> | Tue Oct 05 15:52:11 2021 +0530 |
committer | Ankush Menat <ankush@iwebnotes.com> | Tue Oct 05 15:52:11 2021 +0530 |
tree | 7f070bb78f548a2f9a7a6f61df3af1f307a02c0a | |
parent | ab2adf01c5a0942e10800a15691c9cf94fb9112d [diff] |
fix: ignore random periodicity in validations
diff --git a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py index 0bf5aea..a1df9cf 100644 --- a/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py +++ b/erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py
@@ -47,7 +47,7 @@ "Yearly": 365 } 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 item.no_of_visits: item.end_date = add_days(item.start_date, item.no_of_visits * days_in_period[item.periodicity])