From 611f36b0282bfc3e6c5f3b1e6608c4516dc1b7aa Mon Sep 17 00:00:00 2001 From: vincent porte Date: Mon, 18 Sep 2023 17:18:47 +0200 Subject: [PATCH] fix(forum_attachment) missing file in dev --- .../forum_attachments/attachments_detail.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lacommunaute/templates/forum_conversation/forum_attachments/attachments_detail.html b/lacommunaute/templates/forum_conversation/forum_attachments/attachments_detail.html index c58ece00b..912d590f4 100644 --- a/lacommunaute/templates/forum_conversation/forum_attachments/attachments_detail.html +++ b/lacommunaute/templates/forum_conversation/forum_attachments/attachments_detail.html @@ -6,13 +6,17 @@ {% if post.attachments.exists and user_can_download_files %}
{% for attachment in post.attachments.all %} - {% if not attachment|is_image %} -
-  {{ attachment.filename }} ({{ attachment.file.size|filesizeformat }}) - {% if attachment.comment %} -

{{ attachment.comment }}

- {% endif %} -
+ {% if attachement %} + {% if not attachment|is_image %} +
+  {{ attachment.filename }} ({{ attachment.file.size|filesizeformat }}) + {% if attachment.comment %} +

{{ attachment.comment }}

+ {% endif %} +
+ {% endif%} + {%else%} +

{{attachment.filename}}

{% endif %} {% endfor %}