Handle incomplete query
This commit is contained in:
parent
d94d1bb170
commit
d12c85cfde
|
@ -111,8 +111,9 @@ class WikidataQuery(Base):
|
|||
error_text = Column(String)
|
||||
query_template = Column(String)
|
||||
|
||||
@hybrid_property
|
||||
@property
|
||||
def duration(self):
|
||||
if self.end_time:
|
||||
return self.end_time - self.start_time
|
||||
|
||||
@property
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
{% if obj.status_code != 200 %}{% set class=" text-light bg-danger"%}{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-2{{ class }}">
|
||||
{% if obj.end_time %}
|
||||
{{ obj.start_time.strftime('%Y %b %d %H:%M') }}
|
||||
{% else %}
|
||||
running
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-4"><a href="{{ obj.path }}">{{ obj.path }}</a></div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue