Merge pull request #3003 from AlanCoding/2988_team_cascade

Cascade delete teams from organization
This commit is contained in:
Alan Rominger
2016-07-14 15:13:46 -04:00
committed by GitHub
4 changed files with 73 additions and 2 deletions

View File

@@ -92,8 +92,8 @@ class Team(CommonModelNameNotUnique, ResourceMixin):
organization = models.ForeignKey(
'Organization',
blank=False,
null=True,
on_delete=models.SET_NULL,
null=False,
on_delete=models.CASCADE,
related_name='teams',
)
deprecated_projects = models.ManyToManyField(