Added news locale check

This commit is contained in:
dormantman 2020-01-13 12:24:48 +03:00 committed by Kuroshini
parent f048cf2e17
commit bb7cd98b98

View File

@ -40,6 +40,9 @@ def send_email_with_news(news_ids):
try: try:
for new in sent_news: for new in sent_news:
if new.country.code != country_code:
continue
context = { context = {
"title": new.title.get(subscriber.locale), "title": new.title.get(subscriber.locale),
"subtitle": new.subtitle.get(subscriber.locale), "subtitle": new.subtitle.get(subscriber.locale),