From 6282c374f7cac26951009ce6b22b86769f750384 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 09:59:09 +0100 Subject: [PATCH 1/2] Fixed habit times check --- app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.py b/app.py index 087d361..e4a9fa7 100644 --- a/app.py +++ b/app.py @@ -207,6 +207,10 @@ def habit_create(): except ValueError: 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 errors: return render_template( 'habit.html', @@ -378,6 +382,9 @@ 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 errors: return render_template( "edit-habit.html", From 8814a6a834a6215ca4842cc4c19004e0492e8e03 Mon Sep 17 00:00:00 2001 From: Verox001 Date: Tue, 5 Mar 2024 10:13:50 +0100 Subject: [PATCH 2/2] Added requirements.txt --- requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..fc4309f --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pillow~=10.2.0 +flask~=3.0.0 \ No newline at end of file