Fix AttributeError in sendmail form

PRETIXEU-1NQ
This commit is contained in:
Raphael Michel
2019-12-01 11:17:30 +01:00
parent d44b75388e
commit 99607aa74a

View File

@@ -97,8 +97,10 @@ class SenderView(EventPermissionRequiredMixin, FormView):
))
if len(ql) == 2:
opq = opq.filter(ql[0] | ql[1])
else:
elif ql:
opq = opq.filter(ql[0])
else:
opq = opq.none()
if form.cleaned_data.get('subevent'):
opq = opq.filter(subevent=form.cleaned_data.get('subevent'))