mirror of
https://github.com/ae-utbm/sith.git
synced 2025-03-09 23:07:11 +00:00
fix generate_galaxy_test_data
This commit is contained in:
parent
3d5cf98fb6
commit
9246c47774
@ -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)
|
||||
]
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user