def delete_doc_if_exists(doctype, name, force=0):
 if db.exists(doctype, name):
  delete_doc(doctype, name, force=force)

def delete_doc_if_exists ( doctype , name , force = 0 ) : if db . exists ( doctype , name ) : delete_doc ( doctype , name , force = force )
delete document if exists .