We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 243d1fa commit 150583cCopy full SHA for 150583c
1 file changed
pgweb/news/management/commands/social_post.py
@@ -33,7 +33,7 @@ def handle(self, *args, **options):
33
if not curs.fetchall()[0][0]:
34
raise CommandError("Failed to get advisory lock, existing social_post process stuck?")
35
36
- articles = list(NewsArticle.objects.filter(modstate=ModerationState.APPROVED, date__gt=datetime.now() - timedelta(days=7)).exclude(postedto__contains=allprovidernames).order_by('date'))
+ articles = list(NewsArticle.objects.filter(modstate=ModerationState.APPROVED, date__gt=datetime.now() - timedelta(days=7)).exclude(postedto__has_keys=allprovidernames).order_by('date'))
37
if not len(articles):
38
return
39
0 commit comments