should_read same country
This commit is contained in:
parent
36c4641ed0
commit
c82362b268
|
|
@ -136,6 +136,7 @@ class NewsQuerySet(TranslationQuerysetMixin):
|
|||
def should_read(self, news, user):
|
||||
return self.model.objects.exclude(pk=news.pk).published(). \
|
||||
annotate_in_favorites(user). \
|
||||
filter(country=news.country). \
|
||||
with_base_related().by_type(news.news_type).distinct().order_by('?')
|
||||
|
||||
def same_theme(self, news, user):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user