From 751256518483252771bc47a4452800a0b2c5fb03 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Fri, 25 Sep 2020 12:45:47 +0530 Subject: [PATCH] fix: Patient Appointment not able to save (#23434) Co-authored-by: Rucha Mahabal --- .../doctype/patient_appointment/patient_appointment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py index 512fb48360..e685b20a8c 100755 --- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py +++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe.model.document import Document import json -from frappe.utils import getdate, get_time +from frappe.utils import getdate, get_time, flt from frappe.model.mapper import get_mapped_doc from frappe import _ import datetime @@ -45,7 +45,7 @@ class PatientAppointment(Document): def validate_overlaps(self): end_time = datetime.datetime.combine(getdate(self.appointment_date), get_time(self.appointment_time)) \ - + datetime.timedelta(minutes=float(self.duration)) + + datetime.timedelta(minutes=flt(self.duration)) overlaps = frappe.db.sql(""" select