Skip to content

Commit 19dbb37

Browse files
author
Joel Collins
committed
Handle missing semantic type
1 parent 87adad5 commit 19dbb37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/labthings/td.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def view_to_thing_property(self, rules: list, view: View):
172172
"uriVariables": {},
173173
}
174174

175-
semtype = getattr(view, "semtype")
175+
semtype = getattr(view, "semtype", None)
176176
if semtype:
177177
prop_description["@type"] = semtype
178178

@@ -222,7 +222,7 @@ def view_to_thing_action(self, rules: list, view: View):
222222
# Add schema to prop description
223223
action_description["input"] = schema_to_json(action_input_schema)
224224

225-
semtype = getattr(view, "semtype")
225+
semtype = getattr(view, "semtype", None)
226226
if semtype:
227227
action_description["@type"] = semtype
228228

0 commit comments

Comments
 (0)