fixes issue #624
This commit is contained in:
@@ -2222,6 +2222,7 @@ class TrainingMicroCycle(models.Model):
|
||||
return stri
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
if self.enddate < self.startdate: # pragma: no cover
|
||||
startdate = self.startdate
|
||||
enddate = self.enddate
|
||||
@@ -2249,9 +2250,7 @@ class TrainingMicroCycle(models.Model):
|
||||
if othercycle.enddate >= self.startdate and othercycle.enddate <= self.enddate:
|
||||
self.startdate = othercycle.enddate+datetime.timedelta(days=1)
|
||||
|
||||
|
||||
|
||||
if not self.enddate <= self.startdate:
|
||||
if not self.enddate < self.startdate:
|
||||
super(TrainingMicroCycle,self).save(*args, **kwargs)
|
||||
|
||||
class TrainingMesoCycleForm(ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user