Skip to content
Snippets Groups Projects
Commit 7c288a25 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Remove remove_automation_id management command

parent 9084dc95
No related branches found
No related tags found
No related merge requests found
Pipeline #1822 passed
from django.core.management.base import BaseCommand, CommandError
from program.models import Schedule
class Command(BaseCommand):
help = "removes the automation_id from the program slots"
args = "<automation_id>"
def handle(self, *args, **options):
if len(args) == 1:
automation_id = args[0]
else:
raise CommandError("you must provide the automation_id")
Schedule.objects.filter(automation_id=automation_id).update(automation_id=None)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment