Skip to content

Commit

Permalink
Only uplift JSON dicts and lists
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 22, 2023
1 parent 3a7a26c commit 8ca9fa5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ogc/bblocks/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def validate_inner():
report.add_info('Files', f'"@graph" found, unwrapping')

try:
if filename.suffix == '.json' and jsonld_context:
if (filename.suffix == '.json' and jsonld_context
and (isinstance(json_doc, dict) or isinstance(json_doc, list))):
report.add_info('Files', 'JSON-LD context is present - uplifting')
new_context = jsonld_context['@context']
if isinstance(json_doc, dict):
Expand Down

0 comments on commit 8ca9fa5

Please sign in to comment.