bug fix
This commit is contained in:
@@ -1418,10 +1418,12 @@ class TrainingPlan(models.Model):
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
manager = self.manager
|
||||
|
||||
if manager.rowerplan in ['basic','pro']:
|
||||
raise ValidationError(
|
||||
"Basic user cannot have a training plan"
|
||||
)
|
||||
if manager.plantrialexpires < timezone.now().date():
|
||||
raise ValidationError(
|
||||
"Basic user cannot have a training plan"
|
||||
)
|
||||
|
||||
if self.enddate < self.startdate:
|
||||
startdate = self.startdate
|
||||
|
||||
Reference in New Issue
Block a user