Merge pull request #27879 from rmehta/fix-update-app-patch

fix(patch): update_app.py
This commit is contained in:
Rushabh Mehta 2024-09-23 23:07:27 +05:30 committed by GitHub
commit 99f233c6c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,11 @@ from frappe.modules.utils import get_module_app
def execute():
for module in frappe.get_all("Module Def", ["name", "app_name"], filters=dict(custom=0)):
if not module.app_name:
frappe.db.set_value("Module Def", module.name, "app_name", get_module_app(module.name))
try:
frappe.db.set_value("Module Def", module.name, "app_name", get_module_app(module.name))
except Exception:
# for some default modules like Home, there is no folder / app
pass
for workspace in frappe.get_all("Workspace", ["name", "module", "app"]):
if not workspace.app and workspace.module: