Check that dictionary entry exists

main
bashrc 2026-08-02 10:54:59 +01:00
parent 4ee02a7670
commit 2d1593adae
1 changed files with 6 additions and 0 deletions

View File

@ -4070,6 +4070,12 @@ class JsonLdProcessor(object):
defined.get(value) is not True):
self._create_term_definition(active_ctx, local_ctx, value, defined)
if not active_ctx:
return value
if not active_ctx.get('mappings'):
return value
if vocab and value in active_ctx['mappings']:
mapping = active_ctx['mappings'].get(value)
# value is explicitly ignored with None mapping