Skip to content

Commit

Permalink
fix(Nursing Task): unknown column duration error in Healthcare Activity
Browse files Browse the repository at this point in the history
(cherry picked from commit 03061d2)
  • Loading branch information
Sajinsr authored and akurungadam committed May 14, 2024
1 parent 51f40fa commit 000d698
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion healthcare/healthcare/doctype/nursing_task/nursing_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 000d698

Please sign in to comment.