Skip to content

Commit

Permalink
Merge pull request #9 from linkml/none-val-rendering
Browse files Browse the repository at this point in the history
allow None value rendering
  • Loading branch information
cmungall authored Jun 26, 2024
2 parents 878352f + 840a39c commit 867cb5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/linkml_renderer/renderers/html_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def generate(self, element: Union[YAMLRoot, BaseModel], context: HTMLContext) ->
:param context:
:return:
"""
if not isinstance(element, (YAMLRoot, BaseModel, dict, list)):
return self.generate_atom(element, context)
if context.source_path is None:
if isinstance(element, YAMLRoot):
root = type(element).class_name
Expand Down Expand Up @@ -396,7 +398,8 @@ def generate_atom(self, element: PRIMITIVE, context: HTMLContext) -> None:
elif et in sv.all_enums():
a(str(element))
else:
raise ValueError(f"ELEMENT {element}")
a(str(element))
# raise ValueError(f"ELEMENT {element}")

def generate_reference(self, element: str, context: HTMLContext) -> None:
"""
Expand Down

0 comments on commit 867cb5c

Please sign in to comment.