From 4d3dc87a1a2dcf4ad7c71c276c0fc4e8368944dc Mon Sep 17 00:00:00 2001 From: Pranav Nachnekar Date: Tue, 5 Nov 2019 04:32:06 +0000 Subject: [PATCH] Apply suggestions from code review Co-Authored-By: Shivam Mishra --- .../appointment_booking_settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py index 2aa51caefd..bb45b7222b 100644 --- a/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py +++ b/erpnext/crm/doctype/appointment_booking_settings/appointment_booking_settings.py @@ -23,12 +23,12 @@ class AppointmentBookingSettings(Document): to_time = datetime.datetime.strptime( self.min_date+record.to_time, self.format_string) timedelta = to_time-from_time - self.from_time_is_later_than_to_time(from_time, to_time) + self.validate_from_and_to_time(from_time, to_time) self.duration_is_divisible(from_time, to_time) - def from_time_is_later_than_to_time(self, from_time, to_time): + def validate_from_and_to_time(self, from_time, to_time): if from_time > to_time: - err_msg = 'From Time cannot be later than To Time for '+record.day_of_week + err_msg = _(''From Time cannot be later than To Time for {0}'').format(record.day_of_week) frappe.throw(_(err_msg)) def duration_is_divisible(self, from_time, to_time):