works
This commit is contained in:
@@ -2420,11 +2420,11 @@ class PlannedSessionStep(models.Model):
|
||||
targetvalue = models.IntegerField(default=0)
|
||||
targettype = models.TextField(default='',max_length=200, blank=True, null=True,
|
||||
choices=targettypes)
|
||||
customtargetvaluelow = models.IntegerField(default=0)
|
||||
customtargetvaluehigh = models.IntegerField(default=0)
|
||||
targetvaluelow = models.IntegerField(default=0)
|
||||
targetvaluehigh = models.IntegerField(default=0)
|
||||
intensity = models.TextField(default='',max_length=200, blank=True, null=True,
|
||||
choices=intensitytypes)
|
||||
notes = models.TextField(default='',max_length=200, blank=True, null=True)
|
||||
description = models.TextField(default='',max_length=200, blank=True, null=True)
|
||||
color = models.TextField(default='#ddd',max_length=200)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
@@ -2437,6 +2437,19 @@ class PlannedSessionStep(models.Model):
|
||||
|
||||
super(PlannedSessionStep, self).save(*args, **kwargs)
|
||||
|
||||
def asdict(self):
|
||||
d = {
|
||||
'wkt_step_name': self.name,
|
||||
'durationType': self.durationtype,
|
||||
'durationValue': self.durationvalue,
|
||||
'targetValue': self.targetvalue,
|
||||
'description': self.description,
|
||||
'stepId': self.pk,
|
||||
'intensity': self.intensity,
|
||||
}
|
||||
|
||||
return d
|
||||
|
||||
class StepEditorForm(ModelForm):
|
||||
class Meta:
|
||||
model = PlannedSessionStep
|
||||
|
||||
Reference in New Issue
Block a user