X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e852900e42eb0bde98daf7070d84816e44c3308e..fcb17284f29204793cb23b75609a2f82737960e0:/src/messaging/models.py diff --git a/src/messaging/models.py b/src/messaging/models.py index 8ef6c4c0f..da8a01edc 100644 --- a/src/messaging/models.py +++ b/src/messaging/models.py @@ -40,7 +40,7 @@ class EmailTemplate(models.Model): state = self.get_state(time=time) contacts = state.get_contacts() - contacts = contacts.exclude(emailsent_set__template=self) + contacts = contacts.exclude(emailsent__template=self) for contact in contacts: self.send(contact, verbose=verbose, dry_run=dry_run)