Merge branch 'develop' of https://github.com/0Pranav/erpnext into develop
diff --git a/erpnext/crm/doctype/appointment/appointment.py b/erpnext/crm/doctype/appointment/appointment.py
index b259758..95c7f35 100644
--- a/erpnext/crm/doctype/appointment/appointment.py
+++ b/erpnext/crm/doctype/appointment/appointment.py
@@ -49,6 +49,8 @@
 
 	def on_update(self):
 		# Sync Calednar
+		if not self.calendar_event:
+			return
 		cal_event = frappe.get_doc('Event',self.calendar_event)
 		cal_event.starts_on = self.scheduled_time
 		cal_event.save()