Skip to content

Commit ffe36c6

Browse files
authored
fix: Fixes jsonld issue when importing from dataverse (#759)
* fix: Fixes jsonld issue when importing from dataverse
1 parent 2b1948d commit ffe36c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

renku/core/models/jsonld.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,8 @@ def from_jsonld(
418418
if data['@context'] != cls._jsonld_context:
419419
# merge new context into old context to prevent properties
420420
# getting lost in jsonld expansion
421+
if isinstance(data['@context'], str):
422+
data['@context'] = {'@base': data['@context']}
421423
data['@context'].update(cls._jsonld_context)
422424
try:
423425
compacted = ld.compact(data, cls._jsonld_context)

0 commit comments

Comments
 (0)