diff --git a/app.py b/app.py index e4a9fa7..dd72258 100644 --- a/app.py +++ b/app.py @@ -208,8 +208,8 @@ def habit_create(): errors['list_query'] = 'Die Anzahl muss eine Zahl sein.' # Check if unit is day and times is one - if unit == 'Tag' and times == 1: - errors['times'] = 'Die Anzahl muss größer als 1 sein, wenn das Habit täglich ist.' + if unit == 'Tag' and times != 1: + errors['times'] = 'Die Anzahl muss 1 sein, wenn das Habit täglich ist.' if errors: return render_template( @@ -382,8 +382,8 @@ def edit_habit_change(): except ValueError: errors['list_query'] = 'Die Anzahl muss eine Zahl sein.' - if unit == 'Tag' and times == 1: - errors['times'] = 'Die Anzahl muss größer als 1 sein, wenn das Habit täglich ist.' + if unit == 'Tag' and times != 1: + errors['times'] = 'Die Anzahl muss 1 sein, wenn das Habit täglich ist.' if errors: return render_template( @@ -667,4 +667,4 @@ def add_user(): # Run the application if __name__ == '__main__': - app.run(port=5000, debug=True) + app.run(host="0.0.0.0", port=5000, debug=True) diff --git a/requirements.txt b/requirements.txt index fc4309f..dc40e89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ pillow~=10.2.0 -flask~=3.0.0 \ No newline at end of file +flask~=3.0.0 +flask-login~=0.6.3 \ No newline at end of file