[email] Fix database call
This commit is contained in:
parent
3bc43a51e9
commit
8211a29ebd
|
@ -24,11 +24,7 @@ class EmailBot(Censor):
|
|||
""" Loop which waits for new messages and sends emails to all subscribers. """
|
||||
while True:
|
||||
message = await self.receive()
|
||||
for subscriber in EmailSubscribers(hood=self.hood.id):
|
||||
payload = {
|
||||
'email': subscriber.email,
|
||||
'hood': self.hood.id,
|
||||
}
|
||||
for subscriber in EmailSubscribers.objects.filter(hood=self.hood.id):
|
||||
token = to_token(email=subscriber.email, hood=self.hood.id)
|
||||
unsubscribe_link = (
|
||||
config['root_url']
|
||||
|
|
Loading…
Reference in a new issue