diff --git a/app.py b/app.py index b92f71e..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(