emencia / emencia-django-newsletter

An app for sending newsletter by email to a contact list.
189 stars 72 forks source link

Can't add contact to mailing list if workgroup not activated #26

Closed alexgarel closed 13 years ago

alexgarel commented 13 years ago

If workgroup are not activated and user is not super user, it is impossible to add any contact as it filters on an empty set of workgroups.

Problem is in admin/mailinglist.py line 54

if 'subscribers' in db_field.name and not request.user.is_superuser:
        contacts_pk = request_workgroups_contacts_pk(request)
        kwargs['queryset'] = Contact.objects.filter(pk__in=contacts_pk)

Solution may be to add a control on workgroup activation.

Fantomas42 commented 13 years ago

Thank you for the report.

Fixed in Fantomas42/emencia-django-newsletter@18a81af81f5d78c9e1da20c13ad5c0081792a9b8