Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pyld/context_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def resolve(self, active_ctx, context, base, cycles=None):
all_resolved.extend(resolved)
else:
all_resolved.append(resolved)
elif not ctx:
elif ctx is None or ctx is False:
all_resolved.append(ResolvedContext(False))
elif not isinstance(ctx, dict) and not isinstance(ctx, frozendict):
raise jsonld.JsonLdError(
Expand Down
4 changes: 2 additions & 2 deletions lib/pyld/jsonld.py
Original file line number Diff line number Diff line change
Expand Up @@ -2320,7 +2320,7 @@ def _expand(
for type_ in sorted(types):
ctx = JsonLdProcessor.get_context_value(
type_scoped_ctx, type_, '@context')
if ctx is not None:
if ctx is not None and ctx is not False:
active_ctx = self._process_context(
active_ctx, ctx, options, propagate=False)

Expand Down Expand Up @@ -3070,7 +3070,7 @@ def _process_context(self, active_ctx, local_ctx, options,
active_ctx['_uuid'] = str(uuid.uuid1())

# reset to initial context
if not ctx:
if ctx is None or ctx is False:
if (not override_protected and
any(v.get('protected') for v in rval['mappings'].values())):
raise JsonLdError(
Expand Down