fix: workspace loading error
Workspace loads to fail if there are no links in any extended workspaces.
This commit is contained in:
parent
916ec171fa
commit
b7fb1d475e
2 changed files with 4 additions and 3 deletions
|
|
@ -368,6 +368,7 @@ def get_desktop_page(page):
|
|||
'allow_customization': not wspace.doc.disable_user_customization
|
||||
}
|
||||
except DoesNotExistError:
|
||||
frappe.log_error(frappe.get_traceback())
|
||||
return {}
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
|
|||
|
|
@ -43,19 +43,19 @@ class Workspace(Document):
|
|||
|
||||
def get_link_groups(self):
|
||||
cards = []
|
||||
current_card = {
|
||||
current_card = frappe._dict({
|
||||
"label": "Link",
|
||||
"type": "Card Break",
|
||||
"icon": None,
|
||||
"hidden": False,
|
||||
}
|
||||
})
|
||||
|
||||
card_links = []
|
||||
|
||||
for link in self.links:
|
||||
link = link.as_dict()
|
||||
if link.type == "Card Break":
|
||||
if card_links and (not current_card.only_for or current_card.only_for == frappe.get_system_settings('country')):
|
||||
if card_links and (not current_card.only_for or current_card.only_for == frappe.get_system_settings('country')):
|
||||
current_card['links'] = card_links
|
||||
cards.append(current_card)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue