from django.core.management.base import BaseCommand
from extractly.models import AdsManual
from django.db.models import Q

class Command(BaseCommand):
    help = "Zaznacza is_fetched=True jeśli w polu sliced_html znajdują się dane"

    def handle(self, *args, **options):
        updated = AdsManual.objects.filter(
        ).update(isSendToMainServer=False)

        self.stdout.write(self.style.SUCCESS(f"Zaktualizowano {updated} rekordów."))
