diff --git a/src/postorius/doc/development.rst b/src/postorius/doc/development.rst index 14e1240..86c153d 100644 --- a/src/postorius/doc/development.rst +++ b/src/postorius/doc/development.rst @@ -151,7 +151,7 @@ >>> mailman_dev = client.get_list('mailman-developers@python.org') >>> print mailman_dev settings - {u'owner_address': u'mailman-developers@python.org', + {u'description': u'Mailman development', u'default_nonmember_action': u'hold', ...} For detailed information how to use mailman.client, check out its documentation_. diff --git a/src/postorius/tests/mailman_api_tests/test_list_new.py b/src/postorius/tests/mailman_api_tests/test_list_new.py index 8df4373..187c232 100644 --- a/src/postorius/tests/mailman_api_tests/test_list_new.py +++ b/src/postorius/tests/mailman_api_tests/test_list_new.py @@ -55,3 +55,4 @@ self.client.post(reverse('list_new'), post_data) a_new_list = self.mm_client.get_list('a_new_list@example.com') self.assertEqual(a_new_list.fqdn_listname, u'a_new_list@example.com') + self.assertEqual(a_new_list.owners, [u'owner@example.com']) diff --git a/src/postorius/views/list.py b/src/postorius/views/list.py index 3bf9532..f2969c7 100644 --- a/src/postorius/views/list.py +++ b/src/postorius/views/list.py @@ -306,10 +306,9 @@ try: mailing_list = domain.create_list( form.cleaned_data['listname']) + mailing_list.add_owner(form.cleaned_data['list_owner']) list_settings = mailing_list.settings list_settings["description"] = form.cleaned_data['description'] - list_settings["owner_address"] = \ - form.cleaned_data['list_owner'] list_settings["advertised"] = form.cleaned_data['advertised'] list_settings.save() messages.success(request, _("List created"))