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:
|
else:
|
||||||
delete_tracking.delete()
|
delete_tracking.delete()
|
||||||
|
|
||||||
|
# Update habit
|
||||||
|
habit.fill_statistics()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"habitId": habit_id,
|
"habitId": habit_id,
|
||||||
"unchecked": not delete_tracking
|
"unchecked": not delete_tracking
|
||||||
|
|||||||
@ -93,7 +93,7 @@ class Habit:
|
|||||||
count += 1
|
count += 1
|
||||||
# month
|
# month
|
||||||
elif self.unit == 2:
|
elif self.unit == 2:
|
||||||
if tracking.created_at.date().month == datetime.today().month:
|
if tracking.created_at.month == datetime.today().month:
|
||||||
self.checked = True
|
self.checked = True
|
||||||
count += 1
|
count += 1
|
||||||
# year
|
# year
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user