Cannot delete customer, even if linked doctype is deleted

Hi Everyone :slight_smile: ,

I have custom doctype linked with customer. When i am trying delete customer i am getting

Cannot delete or cancel because Customer

But linked document is deleted. There is no any document in this doctype list. I removed all document also programatically. So i am 100% sure that, there is no ani data in this related doctype. I also tried frappe.get_doc but i am getting that document doesnt exist. I also removed data from “Deleted Document” doctype.

Maybe there is some another table where are links stored ?

Thanks

ERPNext: v11.1.68 (version-11)
Frappe Framework: v11.1.62 (version-11)

Hi i solved it with argument force = 1

frappe.delete_doc(doctype, d.name, force=1,  for_reload=True)