Merge "Correctly set content-type for workflow response"
This commit is contained in:
commit
944d9df390
@ -192,7 +192,8 @@ class ModalFormView(ModalFormMixin, views.HorizonFormView):
|
|||||||
field_id = self.request.META[ADD_TO_FIELD_HEADER]
|
field_id = self.request.META[ADD_TO_FIELD_HEADER]
|
||||||
data = [self.get_object_id(handled),
|
data = [self.get_object_id(handled),
|
||||||
self.get_object_display(handled)]
|
self.get_object_display(handled)]
|
||||||
response = http.HttpResponse(json.dumps(data))
|
response = http.HttpResponse(
|
||||||
|
json.dumps(data), content_type="text/plain")
|
||||||
response["X-Horizon-Add-To-Field"] = field_id
|
response["X-Horizon-Add-To-Field"] = field_id
|
||||||
elif isinstance(handled, http.HttpResponse):
|
elif isinstance(handled, http.HttpResponse):
|
||||||
return handled
|
return handled
|
||||||
|
Loading…
Reference in New Issue
Block a user