From db64c69dace07d36753e31537ec45bb7abb8e668 Mon Sep 17 00:00:00 2001 From: 0Pranav Date: Wed, 13 Nov 2019 11:12:38 +0530 Subject: [PATCH] fix: reference before assignement error --- erpnext/www/book-appointment/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/www/book-appointment/index.py b/erpnext/www/book-appointment/index.py index 707be6775c..1fe1987453 100644 --- a/erpnext/www/book-appointment/index.py +++ b/erpnext/www/book-appointment/index.py @@ -86,8 +86,8 @@ def create_appointment(date, time, tz, contact): scheduled_time = convert_to_system_timezone(tz, scheduled_time) scheduled_time = scheduled_time.replace(tzinfo=None) # Create a appointment document from form - appointment.scheduled_time = scheduled_time appointment = frappe.new_doc('Appointment') + appointment.scheduled_time = scheduled_time contact = json.loads(contact) appointment.customer_name = contact.get('name',None) appointment.customer_phone_number = contact.get('number', None)