diff --git a/galaxy/management/commands/generate_galaxy_test_data.py b/galaxy/management/commands/generate_galaxy_test_data.py index 2f800db0..0c5614d6 100644 --- a/galaxy/management/commands/generate_galaxy_test_data.py +++ b/galaxy/management/commands/generate_galaxy_test_data.py @@ -127,14 +127,19 @@ class Command(BaseCommand): # the galaxy doesn't care about the club groups, # but it's necessary to add them nonetheless in order # not to break the integrity constraints + pages = Page.objects.bulk_create( + [Page(name="page", _full_name="page") for _ in range(self.NB_CLUBS)] + ) self.clubs = Club.objects.bulk_create( [ Club( name=f"galaxy-club-{i}", + slug_name=f"galaxy-club-{i}", board_group=Group.objects.create(name=f"board {i}"), members_group=Group.objects.create(name=f"members {i}"), + page=page, ) - for i in range(self.NB_CLUBS) + for i, page in enumerate(pages) ] )