From c8b42fa8cb2c2cf49f840a6fcd1daa5e2398dc6d Mon Sep 17 00:00:00 2001 From: Brad Busenius Date: Fri, 15 Apr 2016 16:51:27 -0500 Subject: [PATCH] Fixed a bug with template rendering. --- wagtail/contrib/table_block/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail/contrib/table_block/__init__.py b/wagtail/contrib/table_block/__init__.py index 0198c1c59b..99c68ecab9 100644 --- a/wagtail/contrib/table_block/__init__.py +++ b/wagtail/contrib/table_block/__init__.py @@ -74,7 +74,7 @@ class TableBlock(FieldBlock): def render(self, value): template = getattr(self.meta, 'template', None) - if template: + if template and value: table_header = value['data'][0] if value.get('data', None) and len(value['data']) > 0 and value.get('first_row_is_table_header', False) else None first_col_is_header = value.get('first_col_is_header', False) context = {