From 1ea8f3b3e2b2309ea2fb9535d54d741f6104fceb Mon Sep 17 00:00:00 2001 From: maike Date: Sun, 12 Jul 2020 19:53:22 +0200 Subject: [PATCH] [email] Get email row directly --- kibicara/kibicara_mda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kibicara/kibicara_mda.py b/kibicara/kibicara_mda.py index d7448c6..d8971a8 100644 --- a/kibicara/kibicara_mda.py +++ b/kibicara/kibicara_mda.py @@ -8,7 +8,7 @@ import re import requests from logging import getLogger from kibicara.model import Hood -from kibicara.platforms.email.webapi import get_email +from kibicara.platforms.email.model import Email import argparse @@ -41,7 +41,7 @@ async def main(): # extract hood name from the envelope recipient address hood_name = args.recipient_address.split('@')[0] hood = await Hood.objects.get(name=hood_name) - email_row = await get_email(hood=hood.id) + email_row = await Email.objects.get(hood=hood) body = { 'text': text, 'author': mail.get_unixfrom(),