fix: Content validation
This commit is contained in:
parent
bb55ca4c29
commit
6a599f77eb
1 changed files with 4 additions and 1 deletions
|
|
@ -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", {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue