Skip to content

Commit

Permalink
Fixed reading content type
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Jun 22, 2020
1 parent 540bd64 commit f5e7e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/labthings/server/spec/td.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def build_forms_for_view(rules: list, view: View, op: list):
forms = []
prop_urls = [rule_to_path(rule) for rule in rules]

content_type = get_topmost_spec_attr(view, "_content_type") or "application/json"
content_type = getattr(view, "content_type", None) or "application/json"

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

0 comments on commit f5e7e35

Please sign in to comment.