Skip to content

Commit c748d28

Browse files
committed
Fix code
1 parent 7d87801 commit c748d28

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,10 @@ def complete_task(task_id): # complete task from task id
243243
user.last_completion_date.day,
244244
) # calculate difference in days
245245
if day_difference.days == 1: # if a new day has passed
246-
daily_streak += 1 # increase daily streak by 1
246+
user.daily_streak += 1 # increase daily streak by 1
247247
elif day_difference.days > 1: # if more than a day has passed
248-
daily_streak = 0 # reset daily streak to 0
248+
user.daily_streak = 0 # reset daily streak to 0
249+
249250
user.last_completion_date = (
250251
datetime.now()
251252
) # set user last completion date to today

0 commit comments

Comments
 (0)