Fix: Only if it would be non-null

This commit is contained in:
Reid 'arrdem' McKenzie 2023-06-22 15:01:04 -06:00
parent c9da93f00c
commit 3345cee21b

View file

@ -20,10 +20,12 @@
<label for="filename">File</label> <label for="filename">File</label>
<span name="filename">{{ctx.db.fetch_file(ctx.uid, job.file_id).filename or "it's a secret"}}</span> <span name="filename">{{ctx.db.fetch_file(ctx.uid, job.file_id).filename or "it's a secret"}}</span>
</div> </div>
{% if job.finished_at and job.started_at %}
<div class="job-runtime u-flex"> <div class="job-runtime u-flex">
<label for="runtime">Runtime</label> <label for="runtime">Runtime</label>
<span name="Runtime">{{ (datetime.fromisoformat(job.finished_at) - datetime.fromisoformat(job.started_at)) }}</span> <span name="Runtime">{{ (datetime.fromisoformat(job.finished_at) - datetime.fromisoformat(job.started_at)) }}</span>
</div> </div>
{% endif %}
</div> </div>
<div class="controls u-flex u-ml-auto"> <div class="controls u-flex u-ml-auto">
{% if ctx.uid %} {% if ctx.uid %}