summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/mirrors/url_details_logs.html.jinja4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/mirrors/url_details_logs.html.jinja b/templates/mirrors/url_details_logs.html.jinja
index 58f179d8..51f54931 100644
--- a/templates/mirrors/url_details_logs.html.jinja
+++ b/templates/mirrors/url_details_logs.html.jinja
@@ -14,8 +14,8 @@
<tbody>
{% for log in logs %}<tr class="{{ loop.cycle('odd', 'even') }}">
<td>{{ log.check_time|date('Y-m-d H:i') }}</td>
- <td class="country">{{ country_flag(log.location.country) }}{{ log.location.country.name }}</td>
- <td>{{ log.location.source_ip }}</td>
+ <td class="country">{% if log.location %}{{ country_flag(log.location.country) }}{{ log.location.country.name }}{% else %}Unknown{% endif %}</td>
+ <td>{% if log.location %}{{ log.location.source_ip }}{% else %}Unknown{% endif %}</td>
<td>{{ log.last_sync|date('Y-m-d H:i') }}</td>
<td>{{ log.delay|duration }}</td>
<td>{{ log.duration|floatvalue }}</td>