json cell: check json content type when determining template (#45150)

This commit is contained in:
Frédéric Péters 2020-07-15 20:58:02 +02:00
parent 24980ab6fe
commit 99afae6967
1 changed files with 1 additions and 1 deletions

View File

@ -1610,7 +1610,7 @@ class JsonCellBase(CellBase):
json_content = self._json_content
if json_content is None:
return 'combo/json-error-cell.html'
if json_content.get('data'):
if isinstance(json_content, dict) and json_content.get('data'):
if isinstance(json_content['data'], list):
first_element = json_content['data'][0]
if isinstance(first_element, dict):