diff options
author | Dan McGee <dan@archlinux.org> | 2015-04-07 18:51:44 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2015-04-07 18:51:44 -0500 |
commit | 57198b5cb45fb390b2fa75faff371d323de27dab (patch) | |
tree | 61738d81569fd70c1518d9f466ab70bd3057994a /templates | |
parent | e84c4d01b135a7b96ab2cae0c58588c7ed597d1f (diff) |
Fix URL details page when checks don't have locationsrelease_2015-04-09
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/mirrors/url_details_logs.html.jinja | 4 |
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> |