Forráskód Böngészése

Fix template error when pagepreview page is deleted (#641)

Fixes #460
Vince Salvino 10 hónapja
szülő
commit
05aec4eae7

+ 2 - 0
coderedcms/templates/coderedcms/blocks/pagepreview_block.html

@@ -1,7 +1,9 @@
 {% extends "coderedcms/blocks/base_block.html" %}
 {% load wagtailcore_tags %}
 {% block block_render %}
+{% if self.page %}
 {% with page=self.page.specific %}
 {% include page.miniview_template %}
 {% endwith %}
+{% endif %}
 {% endblock %}