diff --git a/oneliners/management/commands/categorize.py b/oneliners/management/commands/categorize.py index 47828b1..b8406e0 100644 --- a/oneliners/management/commands/categorize.py +++ b/oneliners/management/commands/categorize.py @@ -25,7 +25,7 @@ def handle(self, *args, **options): categorizer = categorization.OpenAiCategorizationComputer(api_key) adapter = models.CategorizationAdapter() - oneliners = models.OneLiner.objects.filter(onelinercategory__isnull=True) + oneliners = models.OneLiner.objects.filter(onelinercategory__isnull=True, is_published=True) if not options['all']: pklist = options['pk'] oneliners = oneliners.filter(pk__in=pklist)