Skip to content

Commit 8c1068d

Browse files
author
Joel Collins
committed
Handle passing None to schema_to_json
1 parent 2e28d14 commit 8c1068d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/labthings/json/schemas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def map_to_schema(schema_dict: dict):
2222

2323

2424
def schema_to_json(schema):
25+
if schema is None:
26+
return None
2527
if isinstance(schema, fields.Field):
2628
return field_to_property(schema)
2729
elif isinstance(schema, Mapping):

0 commit comments

Comments
 (0)