Skip to content

Commit

Permalink
Modify validation_dict helper
Browse files Browse the repository at this point in the history
  • Loading branch information
blagojabozinovski committed Jul 1, 2024
1 parent 4ddefa4 commit 397d7d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckanext/validation/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,14 @@ def validation_extract_report_from_errors(errors):

return report, errors


def validation_dict(validation_json):
return json.loads(validation_json)
if isinstance(validation_json, str):
return json.loads(validation_json)
else:
validation_temp = json.dumps(validation_json)
return json.loads(validation_temp)


def dump_json_value(value, indent=None):
"""
Expand Down

0 comments on commit 397d7d6

Please sign in to comment.