diff --git a/postorius_ldap_membership_management/management/commands/syncldapmemberships.py b/postorius_ldap_membership_management/management/commands/syncldapmemberships.py index 013f453f16aaa16957a01ff9af734579714fb175..e1fa11431f73f7fa8272214df4e1be1dc0641606 100644 --- a/postorius_ldap_membership_management/management/commands/syncldapmemberships.py +++ b/postorius_ldap_membership_management/management/commands/syncldapmemberships.py @@ -83,7 +83,7 @@ class Command(BaseCommand): # user might not be subscribed but should be subscribed -> subscribe # we do not test if he is subscibed already because the mailman api is inconsistent and reports wrong state information for this... # instead we always try to subscribe and catch the error if we are subscribed already - for address in mm_user.addresses[0]: + for address in mm_user.addresses: user_mail = address.email if membership_type == 'member': # discard a subscription request before trying to subscribe else it will fail diff --git a/setup.py b/setup.py index 2fac7ae1468832ca22ec4d20e60341cb7d5e0685..bc3dd9708ea4303bf9b732f7b57c0260629dc1dd 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages setup(name='postorius_ldap_membership_management', - version='1.1', + version='1.2', description='Sync subscriptions from ldap', url='https://git.cccv.de:infra/uffd/postorius-ldap-membership-management', author='Andreas Valder',