From a6c5aa32df188939e1c92d7da205a773836d8d5a Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Mon, 17 May 2021 12:54:16 +0200 Subject: [PATCH] Fix Mailbox creation. Direct assignment to the reverse side of a many-to-many set is prohibited. Use addresses.set() instead. --- orchestra/contrib/mailboxes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orchestra/contrib/mailboxes/admin.py b/orchestra/contrib/mailboxes/admin.py index 0336c052..77e549f3 100644 --- a/orchestra/contrib/mailboxes/admin.py +++ b/orchestra/contrib/mailboxes/admin.py @@ -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):