Remove superflous management command

This commit is contained in:
Lorenz Padberg 2024-03-04 14:41:47 +01:00
parent 6019677890
commit 4e77b0a286
1 changed files with 0 additions and 28 deletions

View File

@ -1,28 +0,0 @@
import json
from logging import getLogger
from django.core.management import BaseCommand
from books.management.commands.migrate_objectives_to_content import create_text_in_content_block, \
create_content_block_snapshot_from_objective, \
create_content_block_contents
from books.models import Chapter, ObjectiveGroupSnapshot, ContentBlockSnapshot, Snapshot, ChapterSnapshot
from books.models import ContentBlock
from books.models import Module
from objectives.models import Objective, ObjectiveSnapshot, ObjectiveGroup
logger = getLogger(__name__)
class Command(BaseCommand):
def handle(self, *args, **options):
analyze()
def analyze():
for chapter in Chapter.objects.filter(title="Lernziele"):
print(f"Chapter: {chapter.get_parent().title} {[cb.title for cb in ContentBlock.get_by_parent(chapter)]}")
# [cb.delete() for cb in ContentBlock.get_by_parent(chapter)]
# chapter.delete()