From bc99551f77a3eae6f5d393dee4f3cebe2d47f3f8 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Wed, 21 Oct 2020 10:37:30 +0200 Subject: [PATCH] changed some print() to raise RuntimeError() --- input/forms.py | 1 - input/views.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/input/forms.py b/input/forms.py index 87fdd9c..0e6f3fb 100644 --- a/input/forms.py +++ b/input/forms.py @@ -13,7 +13,6 @@ class ProjectForm(ModelForm): class Meta: model = Project - # fields = '__all__' exclude = ('pid',) class VolunteerForm(ModelForm): diff --git a/input/views.py b/input/views.py index 1b5234e..6d3ec7d 100644 --- a/input/views.py +++ b/input/views.py @@ -89,7 +89,7 @@ class InternView(CookieWizardView): print ('Ehrenamtsbescheinigung detected!') form = HonoraryCertificateForm(data) else: - print('ERROR! UNKNOWN FORMTYPE!') + raise RuntimeError('ERROR! UNKNOWN FORMTYPE!') else: form = super().get_form(step, data, files) return form @@ -140,7 +140,7 @@ class ExternView(CookieWizardView): form = LibraryForm(data) form.fields['library'].label = v else: - print('ERROR! UNKNOWN FORMTYPE!') + raise RuntimeError('ERROR! UNKNOWN FORMTYPE!') else: form = super().get_form(step, data, files) return form