From 4b26b107a1748a241e426dd19bb0c5addd553e5a Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Tue, 28 Jan 2025 13:10:48 +0530 Subject: [PATCH] fix(auto_repeat): take end date into consideration Otherwise we wouldn't add the end date in the schedule Signed-off-by: Akhil Narang --- frappe/automation/doctype/auto_repeat/auto_repeat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.py b/frappe/automation/doctype/auto_repeat/auto_repeat.py index c2f7a117e5..7e9a6b4eab 100644 --- a/frappe/automation/doctype/auto_repeat/auto_repeat.py +++ b/frappe/automation/doctype/auto_repeat/auto_repeat.py @@ -204,7 +204,7 @@ class AutoRepeat(Document): if self.end_date: next_date = self.get_next_schedule_date(schedule_date=start_date, for_full_schedule=True) - while getdate(next_date) < getdate(end_date): + while getdate(next_date) <= getdate(end_date): row = { "reference_document": self.reference_document, "frequency": self.frequency,