Merge pull request #13583 from leela/fix-workspace-loading-error

fix: workspace loading error
This commit is contained in:
mergify[bot] 2021-06-29 05:11:21 +00:00 committed by GitHub
commit cfd1fac937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -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()

View file

@ -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)