# Generated by Django 2.0.13 on 2019-12-18 09:34

from django.core.management.base import BaseCommand, CommandError
from toxsign.projects.models import Project
from toxsign.scripts.data import change_status

def publicize():
    projects = Project.objects.all()
    for project in projects:
        project.status = "PUBLIC"
        project.save(force=True)
    change_status.delay()


class Command(BaseCommand):
    help = 'Publicize all studies'

    def handle(self, *args, **options):
        publicize()
