Просмотр исходного кода

ensure not to include 'widget/comments.html' when page is not exist

Yuki Takei 9 лет назад
Родитель
Сommit
e766307fb9
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      lib/views/crowi-plus/page.html
  2. 1 1
      lib/views/crowi-plus/page_list.html

+ 1 - 1
lib/views/crowi-plus/page.html

@@ -37,7 +37,7 @@
 {% endblock %}
 
 {% block content_main_after %}
-  {% if not page.isDeleted() %}
+  {% if page and not page.isDeleted() %}
     {% include 'widget/comments.html' %}
   {% endif %}
 {% endblock %}

+ 1 - 1
lib/views/crowi-plus/page_list.html

@@ -37,7 +37,7 @@
 {% endblock %}
 
 {% block content_main_after %}
-  {% if not page.isDeleted() %}
+  {% if page and not page.isDeleted() %}
     {% include 'widget/comments.html' %}
   {% endif %}
 {% endblock %}