Change how slugs are generated in dummy data

This commit is contained in:
Ramon Wenger 2021-08-05 09:32:51 +02:00
parent 7a5d0b90db
commit 1792fe9bf1
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import os
import random
import shutil
from uuid import uuid1
import wagtail_factories
from django.conf import settings
@ -108,7 +109,7 @@ class Command(BaseCommand):
for content_block_idx, content_block_data in enumerate(content_blocks_data):
# ContentBlockFactory.create(parent=chapter, **self.filter_data(content_block_data, 'contents'))
ContentBlockFactory.create(parent=chapter, module=module, **content_block_data)
ContentBlockFactory.create(parent=chapter, module=module, slug=f'{uuid1()}', **content_block_data)
# now create all and rooms
management.call_command('dummy_rooms', verbosity=0)