changed some print() to raise RuntimeError()

This commit is contained in:
Benni Bärmann 2020-10-21 10:37:30 +02:00
parent 93d1f2f9d5
commit bc99551f77
2 changed files with 2 additions and 3 deletions

View File

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

View File

@ -89,7 +89,7 @@ class InternView(CookieWizardView):
print ('Ehrenamtsbescheinigung detected!') print ('Ehrenamtsbescheinigung detected!')
form = HonoraryCertificateForm(data) form = HonoraryCertificateForm(data)
else: else:
print('ERROR! UNKNOWN FORMTYPE!') raise RuntimeError('ERROR! UNKNOWN FORMTYPE!')
else: else:
form = super().get_form(step, data, files) form = super().get_form(step, data, files)
return form return form
@ -140,7 +140,7 @@ class ExternView(CookieWizardView):
form = LibraryForm(data) form = LibraryForm(data)
form.fields['library'].label = v form.fields['library'].label = v
else: else:
print('ERROR! UNKNOWN FORMTYPE!') raise RuntimeError('ERROR! UNKNOWN FORMTYPE!')
else: else:
form = super().get_form(step, data, files) form = super().get_form(step, data, files)
return form return form