From 0462070ac7d4a4fdd7042faa9b855386ffb99835 Mon Sep 17 00:00:00 2001 From: BentiGorlich Date: Tue, 26 Nov 2024 10:44:51 +0100 Subject: [PATCH] Fix error on new magazines for admins New magazines do not have an `apFetchedAt` value so this threw an error --- templates/components/magazine_box.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/components/magazine_box.html.twig b/templates/components/magazine_box.html.twig index ac426b1bc..d84849a53 100644 --- a/templates/components/magazine_box.html.twig +++ b/templates/components/magazine_box.html.twig @@ -55,7 +55,7 @@
  • {{ 'created_at'|trans }}: {{ component('date', {date: computed.magazine.createdAt}) }}
  • - {% if app.user is defined and app.user is not null and app.user.admin() and computed.magazine.apId is not null %} + {% if app.user is defined and app.user is not null and app.user.admin() and computed.magazine.apId is not null and computed.magazine.apFetchedAt is not same as null %}
  • {{ 'last_updated'|trans }}: {{ component('date', {date: computed.magazine.apFetchedAt}) }}