fix: conditional display on Request's 'Filed by' field

Since we support requests which have no associated user, we must
support the case where we are displaying such a request.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-09-05 02:55:20 -07:00
parent 7fed5742b8
commit a629098b92
No known key found for this signature in database
GPG key ID: F7E46DED420788F3

View file

@ -46,9 +46,13 @@
<td class="wrap">{{ result.Comments }}</td>
<td>
{# Filed by #}
<a href="/account/{{ result.User.Username }}">
{{ result.User.Username }}
</a>
{# If the record has an associated User, display a link to that user. #}
{# Otherwise, display nothing (an empty column). #}
{% if result.User %}
<a href="/account/{{ result.User.Username }}">
{{ result.User.Username }}
</a>
{% endif %}
</td>
{% set idle_time = config_getint("options", "request_idle_time") %}
{% set time_delta = (utcnow - result.RequestTS) | int %}