From 7f614c0c5ee5dea957b515c2c3ed9aff2241be98 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 23 Feb 2017 11:58:18 +0100 Subject: [PATCH] Improving sample_data --- taiga/projects/management/commands/sample_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/taiga/projects/management/commands/sample_data.py b/taiga/projects/management/commands/sample_data.py index 14ff7663..2d886c5f 100644 --- a/taiga/projects/management/commands/sample_data.py +++ b/taiga/projects/management/commands/sample_data.py @@ -178,6 +178,9 @@ class Command(BaseCommand): if role.computable: computable_project_roles.add(role) + # Delete a random member so all the projects doesn't have the same team + Membership.objects.filter(project=project).exclude(user=project.owner).order_by("?").first().delete() + # added invitations for i in range(NUM_INVITATIONS): role = self.sd.db_object_from_queryset(project.roles.all())