[email] Hood name never changes

This commit is contained in:
maike 2020-07-06 21:07:03 +02:00 committed by dl6tom
parent 8e1335bc06
commit 0068558efb

View file

@ -19,8 +19,8 @@ class EmailBot(Censor):
async def run(self): async def run(self):
""" Loop which waits for new messages and sends emails to all subscribers. """ """ Loop which waits for new messages and sends emails to all subscribers. """
hood_name = await Hood.objects.get(id=self.model.hood).name
while True: while True:
hood_name = await Hood.objects.get(id=self.model.hood).name
message = await self.receive() message = await self.receive()
for subscriber in EmailSubscribers(hood=self.model.hood): for subscriber in EmailSubscribers(hood=self.model.hood):
json = { json = {