Handle incomplete query

This commit is contained in:
Edward Betts 2019-11-26 18:41:35 +00:00
parent d94d1bb170
commit d12c85cfde
2 changed files with 8 additions and 3 deletions

View file

@ -111,9 +111,10 @@ class WikidataQuery(Base):
error_text = Column(String)
query_template = Column(String)
@hybrid_property
@property
def duration(self):
return self.end_time - self.start_time
if self.end_time:
return self.end_time - self.start_time
@property
def display_seconds(self):