Fix MailForm after encapsulate Mailbox service

This commit is contained in:
Santiago L 2021-09-27 13:17:49 +02:00
parent 0246d0a22e
commit a9c59edbf2
2 changed files with 3 additions and 1 deletions

View file

@ -40,7 +40,7 @@ class MailForm(forms.Form):
super().__init__(*args, **kwargs)
self.fields['domain'].choices = [(d.url, d.name) for d in domains]
self.fields['mailboxes'].choices = [(m['url'], m['name']) for m in mailboxes]
self.fields['mailboxes'].choices = [(m.url, m.name) for m in mailboxes]
def clean(self):
cleaned_data = super().clean()

View file

@ -301,10 +301,12 @@ class Mailbox(OrchestraModel):
description = _('Description details for mailbox page.')
fields = ('name', 'filtering', 'addresses', 'active')
param_defaults = {
'id': None,
'name': None,
'filtering': None,
'is_active': True,
'addresses': [],
'url': None,
}
@classmethod