From a2fb73036c07ea3e826c309961b34956b8fe91c7 Mon Sep 17 00:00:00 2001 From: prssanna Date: Tue, 17 Mar 2020 14:56:15 +0530 Subject: [PATCH] fix: cross-compatible check to see if object is string --- frappe/desk/desktop.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappe/desk/desktop.py b/frappe/desk/desktop.py index 6a0d5acc37..108d02f529 100644 --- a/frappe/desk/desktop.py +++ b/frappe/desk/desktop.py @@ -7,6 +7,7 @@ import frappe import json from frappe import _, DoesNotExistError from frappe.boot import get_allowed_pages, get_allowed_reports +from six import string_types from frappe.cache_manager import build_domain_restriced_doctype_cache, build_domain_restriced_page_cache, build_table_count_cache class Workspace: @@ -109,7 +110,7 @@ class Workspace: new_data = [] for section in cards: new_items = [] - if isinstance(section.links, str): + if isinstance(section.links, string_types): links = json.loads(section.links) else: links = section.links