From 99afae696705dd188fd3c5072a85f816f9a7a763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 15 Jul 2020 20:58:02 +0200 Subject: [PATCH] json cell: check json content type when determining template (#45150) --- combo/data/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combo/data/models.py b/combo/data/models.py index e47e778b..daf7ee2a 100644 --- a/combo/data/models.py +++ b/combo/data/models.py @@ -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):