0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 01:46:24 +01:00

Fixed a bug with template rendering.

This commit is contained in:
Brad Busenius 2016-04-15 16:51:27 -05:00 committed by Matt Westcott
parent 6e66b74a8d
commit c8b42fa8cb

View File

@ -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 = {