]> git.ipfire.org Git - ipfire.org.git/commitdiff
docs: Fix rendering page when a user has been deleted
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2023 14:17:51 +0000 (14:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 14 Dec 2023 14:17:51 +0000 (14:17 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/templates/docs/page.html

index 299547e199b0e6f3660c38901c9232992c53c20f..bd8209e06232a0321e64e7b7fe4152a389fccf4f 100644 (file)
@@ -62,9 +62,9 @@
                                                                                {% end %}
                                                                        {% end %}
 
-                                                                       <a class="level-item" href="/users/{{ page.author.uid }}">
+                                                                       <a class="level-item" href="{% if page.author %}/users/{{ page.author.uid }}{% else %}#{% end %}">
                                                                                {{ _("Last changed by %(author)s, %(when)s") % {
-                                                                                       "author" : page.author,
+                                                                                       "author" : page.author or _("an unknown author"),
                                                                                        "when"   : locale.format_date(page.timestamp, shorter=True),
                                                                                } }}
                                                                        </a>