Error Delete Company Transactions

Hi,

I encountered error when deleting company transactions. The error is ValidationError: Record does not exist which is thrown from frappe/model/document.py. I’ve tried running the query on that python file which is

select modified, docstatus from `tabCompany`
where name = <my company> for update

But it return empty array. This is query explain result:

[
 {
  "rows": null, 
  "select_type": "SIMPLE", 
  "Extra": "Impossible WHERE noticed after reading const tables", 
  "ref": null, 
  "key_len": null, 
  "possible_keys": null, 
  "key": null, 
  "table": null, 
  "type": null, 
  "id": 1
 }
]

Thank you.