Commit 66ec4526 authored by Kristian Tan's avatar Kristian Tan

Displaying daily total on html

parent 995a8573
...@@ -94,7 +94,7 @@ def toggle_pin(change_pin): ...@@ -94,7 +94,7 @@ def toggle_pin(change_pin):
latest_entry.on_time_seconds += elapsed latest_entry.on_time_seconds += elapsed
else: else:
# If no entry for today, make one # If no entry for today, make one
entry = DailyUsage(date=start_date, on_time_seconds=elapsed) entry = DailyUsage(date=start_date.date(), on_time_seconds=elapsed)
db.session.add(entry) db.session.add(entry)
db.session.commit() db.session.commit()
pins[change_pin]['on_time'] = None pins[change_pin]['on_time'] = None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment