Fixed day count
This commit is contained in:
parent
295f02509c
commit
51742411ca
8
app.py
8
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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user