From 6a599f77ebf29a6e466ad44c75c915586ff8971a Mon Sep 17 00:00:00 2001 From: shariquerik Date: Thu, 19 Aug 2021 14:07:52 +0530 Subject: [PATCH] fix: Content validation --- frappe/desk/doctype/workspace/workspace.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 693c34bcd1..31ae5754c1 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -17,7 +17,10 @@ class Workspace(Document): frappe.throw(_("You need to be in developer mode to edit this document")) validate_route_conflict(self.doctype, self.name) - if isinstance(self.content, list): + try: + if not isinstance(loads(self.content), list): + raise + except: frappe.throw(_("Content data shoud be a list")) duplicate_exists = frappe.db.exists("Workspace", {