Fix error on page load
This commit is contained in:
2
app.py
2
app.py
@@ -91,7 +91,7 @@ def generate_report(user_id, begin_date, end_date):
|
|||||||
timestamp = parse_iso_datetime(row["ts"])
|
timestamp = parse_iso_datetime(row["ts"])
|
||||||
if timestamp < begin_dt or timestamp > end_dt:
|
if timestamp < begin_dt or timestamp > end_dt:
|
||||||
continue
|
continue
|
||||||
delta = row["ts"] - timestamp
|
delta = end_dt - timestamp
|
||||||
if row["paid"]:
|
if row["paid"]:
|
||||||
paid_seconds += delta.total_seconds()
|
paid_seconds += delta.total_seconds()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user