Fix Mailbox creation.
Direct assignment to the reverse side of a many-to-many set is prohibited. Use addresses.set() instead.
This commit is contained in:
parent
13b4ac5eee
commit
a6c5aa32df
|
@ -217,7 +217,7 @@ class MailboxAdmin(ChangePasswordAdminMixin, SelectAccountAdminMixin, ExtendedMo
|
||||||
elif obj.custom_filtering:
|
elif obj.custom_filtering:
|
||||||
messages.warning(request, msg)
|
messages.warning(request, msg)
|
||||||
super(MailboxAdmin, self).save_model(request, obj, form, change)
|
super(MailboxAdmin, self).save_model(request, obj, form, change)
|
||||||
obj.addresses = form.cleaned_data['addresses']
|
obj.addresses.set(form.cleaned_data['addresses'])
|
||||||
|
|
||||||
|
|
||||||
class AddressAdmin(SelectAccountAdminMixin, ExtendedModelAdmin):
|
class AddressAdmin(SelectAccountAdminMixin, ExtendedModelAdmin):
|
||||||
|
|
Loading…
Reference in New Issue