Fix MailForm after encapsulate Mailbox service
This commit is contained in:
parent
0246d0a22e
commit
a9c59edbf2
|
@ -40,7 +40,7 @@ class MailForm(forms.Form):
|
||||||
|
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
self.fields['domain'].choices = [(d.url, d.name) for d in domains]
|
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):
|
def clean(self):
|
||||||
cleaned_data = super().clean()
|
cleaned_data = super().clean()
|
||||||
|
|
|
@ -301,10 +301,12 @@ class Mailbox(OrchestraModel):
|
||||||
description = _('Description details for mailbox page.')
|
description = _('Description details for mailbox page.')
|
||||||
fields = ('name', 'filtering', 'addresses', 'active')
|
fields = ('name', 'filtering', 'addresses', 'active')
|
||||||
param_defaults = {
|
param_defaults = {
|
||||||
|
'id': None,
|
||||||
'name': None,
|
'name': None,
|
||||||
'filtering': None,
|
'filtering': None,
|
||||||
'is_active': True,
|
'is_active': True,
|
||||||
'addresses': [],
|
'addresses': [],
|
||||||
|
'url': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in New Issue