fixing bug creating teams for trial users
This commit is contained in:
@@ -363,10 +363,12 @@ class Team(models.Model):
|
||||
"Basic user cannot be team manager"
|
||||
)
|
||||
|
||||
if not can_add_team(manager):
|
||||
raise ValidationError(
|
||||
"Pro and Self-Coach users cannot have more than one team"
|
||||
)
|
||||
if not self.id:
|
||||
# new model instance
|
||||
if not can_add_team(manager):
|
||||
raise ValidationError(
|
||||
"Pro and Self-Coach users cannot have more than one team"
|
||||
)
|
||||
|
||||
super(Team, self).save(*args,**kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user