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
  • Loading branch information
Sajinsr authored and akurungadam committed May 12, 2024
1 parent 8b00487 commit 03061d2
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 @@ -62,7 +62,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 03061d2

Please sign in to comment.