diff --git a/emencia/django/newsletter/mailer.py b/emencia/django/newsletter/mailer.py index 9d4e4dae..c85ec757 100644 --- a/emencia/django/newsletter/mailer.py +++ b/emencia/django/newsletter/mailer.py @@ -350,10 +350,10 @@ class NewsLetterSender(object): if self.newsletter.theme_for_filter: already_sent = \ ContactMailingStatus.objects.filter( - status=ContactMailingStatus.SENT, Q(newsletter=self.newsletter) | \ Q(newsletter__mailing_list=self.newsletter.mailing_list, - creation_date__gte=datetime.now() - timedelta(days=2)) + creation_date__gte=datetime.now() - timedelta(days=2)), + status=ContactMailingStatus.SENT, ).values_list('contact__id', flat=True) qs = qs.filter(contactsettings__theme=self.newsletter.theme_for_filter) diff --git a/fabfile.py b/fabfile.py index 6f252287..ce3ce313 100644 --- a/fabfile.py +++ b/fabfile.py @@ -193,3 +193,8 @@ def ticket1384_p1(): def ticket1384_p2(): with cd(REMOTE_HOME_DIR): run('python manage.py check_translation') + +@ticket +def t1443(): + with cd(REMOTE_HOME_DIR): + run('chown -Rv www-data:www-data locale')