Commit 6b029127 authored by Jérome Perrin's avatar Jérome Perrin

json_form: fix str/bytes confusion

parent bd78ee40
...@@ -82,7 +82,7 @@ class JSONForm(JSONType, TextDocument): ...@@ -82,7 +82,7 @@ class JSONForm(JSONType, TextDocument):
if list_error: if list_error:
validator = jsonschema.validators.validator_for(defined_schema)(defined_schema, format_checker=jsonschema.FormatChecker()) validator = jsonschema.validators.validator_for(defined_schema)(defined_schema, format_checker=jsonschema.FormatChecker())
return { return {
defined_schema["$id"].decode(): [ defined_schema["$id"]: [
("Validation Error", x.message) for x in sorted(validator.iter_errors(json_data), key=lambda e: e.path) ("Validation Error", x.message) for x in sorted(validator.iter_errors(json_data), key=lambda e: e.path)
] ]
} }
......
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