fixed renaming in app.py
he guess i missed some
This commit is contained in:
parent
759c7d277f
commit
e5709775bb
6
app.py
6
app.py
@ -6,7 +6,7 @@ from flask_login import login_required, LoginManager, login_user, logout_user, c
|
||||
|
||||
from models.Habit import Habit
|
||||
from models.HabitList import HabitList
|
||||
from models.HabitTracking import HabitTrackings
|
||||
from models.HabitTracking import HabitTracking
|
||||
from models.User import User
|
||||
from utils import anonymous_required
|
||||
|
||||
@ -335,7 +335,7 @@ def check_habit():
|
||||
if current_user not in users:
|
||||
return {"error": "Habit does not belong to user"}
|
||||
|
||||
trackings = habit.get_habitTrackings()
|
||||
trackings = habit.get_habitTracking()
|
||||
|
||||
# Check if habit has been tracked today
|
||||
delete_tracking = None
|
||||
@ -344,7 +344,7 @@ def check_habit():
|
||||
delete_tracking = tracking
|
||||
|
||||
if not delete_tracking:
|
||||
HabitTrackings.create(habit_id, 1)
|
||||
HabitTracking.create(habit_id)
|
||||
else:
|
||||
delete_tracking.delete()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user