From: Michael Tremer Date: Wed, 22 Aug 2018 08:04:02 +0000 (+0100) Subject: blog: Fix rendering feed when no author exists X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e08a26b707b0b08593e347210e29485181d8be1;p=ipfire.org.git blog: Fix rendering feed when no author exists Signed-off-by: Michael Tremer --- diff --git a/src/templates/blog/feed.xml b/src/templates/blog/feed.xml index 69eaba34..82c239b4 100644 --- a/src/templates/blog/feed.xml +++ b/src/templates/blog/feed.xml @@ -1,4 +1,7 @@ + +{% import ipfire.accounts as accounts %} + {{ post.title }} https://blog.ipfire.org/post/{{ post.slug }} - {{ post.author.email }} ({{ post.author.name }}) + {% if isinstance(post.author, accounts.Account) %} + {{ post.author.email }} ({{ post.author.name }}) + {% else %} + {{ post.author }} + {% end %} {{ post.published_at.strftime("%a, %d %b %Y %H:%M:%S +0200") }}