Fixed day count

This commit is contained in:
Verox001 2024-03-05 10:49:29 +01:00
parent 295f02509c
commit 51742411ca

8
app.py
View File

@ -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(