fix: check if app and category exists in module
This commit is contained in:
parent
f7cf745fb5
commit
d334933601
2 changed files with 3 additions and 1 deletions
|
|
@ -26,7 +26,7 @@ def get_modules_from_all_apps_for_user(user=None):
|
|||
module["onboard_present"] = 1
|
||||
|
||||
if home_settings:
|
||||
category_settings = home_settings[module["category"]]
|
||||
category_settings = home_settings[module.get("category")] if module.get("category") else {}
|
||||
if module_name not in category_settings:
|
||||
module["hidden"] = 1
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ def execute():
|
|||
settings = {}
|
||||
|
||||
for module in all_modules:
|
||||
if not module.get("app"): continue
|
||||
|
||||
links = get_onboard_items(module["app"], frappe.scrub(module["module_name"]))[:5]
|
||||
module_settings = {
|
||||
"links": ",".join([d["label"] for d in links])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue