Fixed small bug and refreshed percentages
This commit is contained in:
parent
51f263061f
commit
45971b4bdf
3
app.py
3
app.py
@ -324,6 +324,9 @@ def check_habit():
|
||||
else:
|
||||
delete_tracking.delete()
|
||||
|
||||
# Update habit
|
||||
habit.fill_statistics()
|
||||
|
||||
return {
|
||||
"habitId": habit_id,
|
||||
"unchecked": not delete_tracking
|
||||
|
||||
@ -93,7 +93,7 @@ class Habit:
|
||||
count += 1
|
||||
# month
|
||||
elif self.unit == 2:
|
||||
if tracking.created_at.date().month == datetime.today().month:
|
||||
if tracking.created_at.month == datetime.today().month:
|
||||
self.checked = True
|
||||
count += 1
|
||||
# year
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user