Commit 7d85b622 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_json_type: use validateLocalJsonSchema to validate local schema

parent a2b42906
......@@ -42,7 +42,7 @@ class JSONType(XMLObject):
, PropertySheet.TextDocument
)
def validateJsonSchema(self, list_error=False):
def validateLocalJsonSchema(self, list_error=False):
"""
Validate contained JSON with the Schema defined in the Portal Type.
"""
......@@ -61,3 +61,6 @@ class JSONType(XMLObject):
return sorted(validator.iter_errors(current_schema), key=lambda e: e.path)
return err
return True
def validateJsonSchema(self, list_error=False):
return self.validateLocalJsonSchema(list_error=list_error)
\ No newline at end of file
......@@ -26,7 +26,7 @@
</item>
<item>
<key> <string>expression</string> </key>
<value> <string>python: object.validateJsonSchema()</string> </value>
<value> <string>python: object.validateLocalJSONSchema()</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment