fix last updated
This commit is contained in:
@@ -16,18 +16,20 @@ def index():
|
||||
|
||||
latest_start = db.execute("SELECT start_time FROM front_log ORDER BY start_time DESC").fetchone()
|
||||
latest_end = db.execute("SELECT end_time FROM front_log ORDER BY end_time DESC").fetchone()
|
||||
|
||||
|
||||
latest = None
|
||||
if latest_start and latest_end:
|
||||
latest = None
|
||||
if latest_end[0]:
|
||||
if latest_start[0] < latest_end[0]:
|
||||
latest = latest_end[0]
|
||||
start = latest_start[0]
|
||||
end = latest_end[0]
|
||||
if end:
|
||||
if start > end:
|
||||
latest = start
|
||||
else:
|
||||
latest = latest_start[0]
|
||||
latest = end
|
||||
else:
|
||||
latest = latest_start[0]
|
||||
else:
|
||||
latest = None
|
||||
latest = start
|
||||
elif latest_start and not latest_end:
|
||||
latest = latest_start[0]
|
||||
|
||||
icons={}
|
||||
for member in homepage:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{% else %}
|
||||
<i><sub>There are currently no members listed as fronting</sub></i>
|
||||
{% endif %}
|
||||
{% if latest %}<br><i><sub>last updated: {{ get_datetime_str(last_updated) }}</sub></i>{% endif %}
|
||||
{% if last_updated %}<br><i><sub>last updated: {{ get_datetime_str(last_updated) }}</sub></i>{% endif %}
|
||||
</div>
|
||||
|
||||
{% for member in home_pins %}
|
||||
|
||||
Reference in New Issue
Block a user