From bb7cd98b9875742f9d67cdacb64b2fbc34ea84de Mon Sep 17 00:00:00 2001 From: dormantman Date: Mon, 13 Jan 2020 12:24:48 +0300 Subject: [PATCH] Added news locale check --- apps/news/tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/news/tasks.py b/apps/news/tasks.py index d66e4db1..d46d3083 100644 --- a/apps/news/tasks.py +++ b/apps/news/tasks.py @@ -40,6 +40,9 @@ def send_email_with_news(news_ids): try: for new in sent_news: + if new.country.code != country_code: + continue + context = { "title": new.title.get(subscriber.locale), "subtitle": new.subtitle.get(subscriber.locale),