def update_comments_in_parent_after_request():
 if hasattr(frappe.local, u'_comments'):
  for (reference_doctype, reference_name, _comments) in frappe.local._comments:
   add_column(reference_doctype, u'_comments', u'Text')
   update_comments_in_parent(reference_doctype, reference_name, _comments)
  frappe.db.commit()

def update_comments_in_parent_after_request ( ) : if hasattr ( frappe . local , u'_comments' ) : for ( reference_doctype , reference_name , _comments ) in frappe . local . _comments : add_column ( reference_doctype , u'_comments' , u'Text' ) update_comments_in_parent ( reference_doctype , reference_name , _comments ) frappe . db . commit ( )
update _comments in parent if _comments column is missing .