Wrap Update at correct level

This commit is contained in:
Alexander Hosking 2022-04-29 23:12:42 -04:00
parent 153f55f7b0
commit c4b68a8c2f

View File

@ -21,11 +21,11 @@ def index():
if current_cycle['end_time'] is None:
cycle_length = (pendulum.now() - start_time).days
db.execute(
'UPDATE cycle SET cycle_length = ?'
' WHERE id = ?',
(cycle_length, current_cycle['id'])
)
db.execute(
'UPDATE cycle SET cycle_length = ?'
' WHERE id = ?',
(cycle_length, current_cycle['id'])
)
cycles = db.execute(
'SELECT id, start_time, end_time, cycle_length'