diff --git a/apps/news/tasks.py b/apps/news/tasks.py index c08ee8c7..4a980144 100644 --- a/apps/news/tasks.py +++ b/apps/news/tasks.py @@ -20,7 +20,7 @@ def send_email_with_news(news_ids): htmly = get_template(settings.NEWS_EMAIL_TEMPLATE) year = datetime.now().year - socials = list(SiteSettings.objects.with_country()) + socials = list(SiteSettings.objects.with_country().select_related('country')) socials = dict(zip(map(lambda social: social.country.code, socials), socials)) for subscriber in subscribers: