From 95f1323b889f42f878f94d68f2cc5fe61d8b7f99 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 13 Jul 2011 22:20:59 +0200 Subject: [PATCH] Do not try to retrieve a mailbox if the user is the default administrator. fixed #151 --- admin/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/forms.py b/admin/forms.py index 8584aff8d..2fe3c5cfa 100644 --- a/admin/forms.py +++ b/admin/forms.py @@ -142,7 +142,8 @@ class AliasForm(ProxyForm): def set_targets(self, user, values): self.ext_targets = [] self.int_targets = [] - umb = Mailbox.objects.get(user=user.id) + if user.id != 1: + umb = Mailbox.objects.get(user=user) for addr in values: if addr == "": continue