Basically during a bench update, I am getting: “frappe.exceptions.LinkExistsError: Cannot delete or cancel because Module Def Contacts is linked with DocType Assets”. I know the cause, I have a custom doc type called Assets which are linked to Contacts. Unfortunately, I cannot get back into the product to remove the link and no other way around this.
Thoughts on how to resolve and how to avoid this in the future?
Unfortunately not working… getting:
frappe.exceptions.LinkExistsError: Cannot delete or cancel because Module Def Contacts is linked with DocType Assets
Thanks for the quick reply, any idea how to fix or to undo the update entirely?
You can disregard… I found a way around this by changing the maria db module name in my doc type, completing the bench update and renaming it back. The custom flag was set to 1 already, so not sure why this issue happened.
You can login to the maria db using the command line mysql -uroot -p[your password] and hit enter You will then be prompted for your password, enter that and hit enter again.
Once logged in, do a show databases; command and find your company db. In my case it was a random string of numbers. Then type use [string of chars] ; That will switch you to that db to active. Not knowing your exact error, I will share what I had to do. If you use my solution below, it will likely do nothing for you. You will need to translate for your situation. I typed:
UPDATE tabDocType SET module ='ContactsOld' where NAME ='Assets';
Then I ran the bench update and reversed the name back
UPDATE tabDocType SET module ='Contacts' where NAME ='Assets';