Skip to content

Commit f5e7e35

Browse files
author
Joel Collins
committed
Fixed reading content type
1 parent 540bd64 commit f5e7e35

File tree

1 file changed

+1
-1
lines changed
  • src/labthings/server/spec

1 file changed

+1
-1
lines changed

src/labthings/server/spec/td.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def build_forms_for_view(rules: list, view: View, op: list):
6363
forms = []
6464
prop_urls = [rule_to_path(rule) for rule in rules]
6565

66-
content_type = get_topmost_spec_attr(view, "_content_type") or "application/json"
66+
content_type = getattr(view, "content_type", None) or "application/json"
6767

6868
for url in prop_urls:
6969
forms.append({"op": op, "href": url, "contentType": content_type})

0 commit comments

Comments
 (0)