diff --git a/wagtail/wagtailcore/blocks/base.py b/wagtail/wagtailcore/blocks/base.py index 153176298..0320c6ad2 100644 --- a/wagtail/wagtailcore/blocks/base.py +++ b/wagtail/wagtailcore/blocks/base.py @@ -246,7 +246,7 @@ class Block(six.with_metaclass(BaseBlock, object)): "keyword argument" % class_with_render_method, category=RemovedInWagtail111Warning ) - new_context = context + new_context = context or {} new_context.update(self.get_context(value)) return mark_safe(render_to_string(template, new_context)) diff --git a/wagtail/wagtailcore/tests/test_blocks.py b/wagtail/wagtailcore/tests/test_blocks.py index 726ee53f1..69f3831f3 100644 --- a/wagtail/wagtailcore/tests/test_blocks.py +++ b/wagtail/wagtailcore/tests/test_blocks.py @@ -84,6 +84,17 @@ class TestFieldBlock(unittest.TestCase): self.assertIs(ws[0].category, RemovedInWagtail111Warning) self.assertEqual(html, '