jsoncell: do not traceback if content-type is absent (#55360)

This commit is contained in:
Benjamin Dauvergne 2021-07-02 18:02:10 +02:00
parent 88f0138995
commit a23696d047
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ def ajax_page_cell(request, page_pk, cell_reference):
if action_response:
response = HttpResponse(
action_response.content, content_type=action_response.headers['Content-Type']
action_response.content, content_type=action_response.headers.get('Content-Type')
)
if 'Content-Disposition' in action_response.headers:
response['Content-Disposition'] = action_response.headers['Content-Disposition']