Remove unused code
This commit is contained in:
parent
817284ab4c
commit
4e7443906d
|
|
@ -15,12 +15,6 @@ logger = getLogger(__name__)
|
|||
|
||||
class Command(BaseCommand):
|
||||
def handle(self, *args, **options):
|
||||
ContentBlock.objects.filter(title__startswith="TESTOBJECTIVE").delete()
|
||||
ContentBlock.objects.filter(title__startswith="CUSTOM").delete()
|
||||
Chapter.objects.filter(title__startswith="TESTOBJECTIVE").delete()
|
||||
ContentBlock.objects.filter(title__startswith="XXX").delete()
|
||||
Chapter.objects.filter(title__startswith="XXX").delete()
|
||||
|
||||
migrate_objectives_to_content()
|
||||
|
||||
|
||||
|
|
@ -61,7 +55,7 @@ def migrate_objectives_to_content():
|
|||
if default_objectives or custom_objectives_by_owner:
|
||||
contentblocks_by_merged_objectives_ids = {}
|
||||
|
||||
# cor custom objectives iterate over owners,
|
||||
# for custom objectives iterate over owners,
|
||||
# - one ownsers custom objectives must not be changed by another owner
|
||||
# - visibility is set per class
|
||||
for owner, owner_objectives in custom_objectives_by_owner.items():
|
||||
|
|
@ -126,6 +120,9 @@ def migrate_objectives_to_content():
|
|||
default_content_block.save()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
except ValidationError as e:
|
||||
print(f"Error with module {module}")
|
||||
logger.error(e)
|
||||
|
|
|
|||
Loading…
Reference in New Issue