From 248cf99b3515ff5c9e554f6cf9f659f32c75d38c Mon Sep 17 00:00:00 2001 From: Sajin SR Date: Tue, 7 May 2024 19:11:32 +0530 Subject: [PATCH] fix(Nursing Task): unknown column duration error in Healthcare Activity (cherry picked from commit 03061d2b6e0f0206d5720ef500c66fbdae2c62e8) --- healthcare/healthcare/doctype/nursing_task/nursing_task.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/healthcare/healthcare/doctype/nursing_task/nursing_task.py b/healthcare/healthcare/doctype/nursing_task/nursing_task.py index 769e55d9b5..01d10625cf 100644 --- a/healthcare/healthcare/doctype/nursing_task/nursing_task.py +++ b/healthcare/healthcare/doctype/nursing_task/nursing_task.py @@ -60,7 +60,9 @@ def set_task_schedule(self): if not self.requested_end_time: if not self.duration: - self.duration = frappe.db.get_value("Healthcare Activity", self.activity, "duration") + self.duration = ( + frappe.db.get_value("Healthcare Activity", self.activity, "activity_duration") or 0 + ) self.requested_end_time = add_to_date(self.requested_start_time, seconds=self.duration) # set date based on requested_start_time