Browse Source

changed some print() to raise RuntimeError()

master
Benni Baermann 4 years ago
parent
commit
bc99551f77
2 changed files with 2 additions and 3 deletions
  1. +0
    -1
      input/forms.py
  2. +2
    -2
      input/views.py

+ 0
- 1
input/forms.py View File

@ -13,7 +13,6 @@ class ProjectForm(ModelForm):
class Meta:
model = Project
# fields = '__all__'
exclude = ('pid',)
class VolunteerForm(ModelForm):

+ 2
- 2
input/views.py View File

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

Loading…
Cancel
Save