mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Do not try to fetch the mailbox associated to an alias if this last one is not defined!
see #178
This commit is contained in:
+6
-6
@@ -78,12 +78,12 @@ def setforward(request, tplname="userprefs/setforward.html"):
|
||||
form = ForwardForm()
|
||||
if al is not None:
|
||||
form.fields["dest"].initial = al.extmboxes
|
||||
try:
|
||||
selfmb = al.mboxes.get(pk=mb.id)
|
||||
except Mailbox.DoesNotExist:
|
||||
pass
|
||||
else:
|
||||
form.fields["keepcopies"].initial = True
|
||||
try:
|
||||
selfmb = al.mboxes.get(pk=mb.id)
|
||||
except Mailbox.DoesNotExist:
|
||||
pass
|
||||
else:
|
||||
form.fields["keepcopies"].initial = True
|
||||
return _render(request, tplname, {
|
||||
"form" : form
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user