Skip to content

Commit 8af5735

Browse files
committed
Always return a dictionary from get_spec
1 parent 9629be0 commit 8af5735

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labthings/server/spec/utilities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
def update_spec(obj, spec):
1313
obj.__apispec__ = obj.__dict__.get("__apispec__", {})
1414
rupdate(obj.__apispec__, spec)
15-
return obj.__apispec__
15+
return obj.__apispec__ or {}
1616

1717

1818
def get_spec(obj):
1919
obj.__apispec__ = obj.__dict__.get("__apispec__", {})
20-
return obj.__apispec__
20+
return obj.__apispec__ or {}
2121

2222

2323
def convert_schema(schema, spec: APISpec):

0 commit comments

Comments
 (0)