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:
Santiago L 2021-05-17 12:54:16 +02:00
parent 13b4ac5eee
commit a6c5aa32df
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ class MailboxAdmin(ChangePasswordAdminMixin, SelectAccountAdminMixin, ExtendedMo
elif obj.custom_filtering:
messages.warning(request, msg)
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):