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