@frappe.whitelist()
def update_event(args, field_map):
 args = frappe._dict(json.loads(args))
 field_map = frappe._dict(json.loads(field_map))
 w = frappe.get_doc(args.doctype, args.name)
 w.set(field_map.start, args[field_map.start])
 w.set(field_map.end, args.get(field_map.end))
 w.save()

@ frappe . whitelist ( ) def update_event ( args , field_map ) : args = frappe . _dict ( json . loads ( args ) ) field_map = frappe . _dict ( json . loads ( field_map ) ) w = frappe . get_doc ( args . doctype , args . name ) w . set ( field_map . start , args [ field_map . start ] ) w . set ( field_map . end , args . get ( field_map . end ) ) w . save ( )
updates event based on passed field_map .