fix
This commit is contained in:
@@ -3529,26 +3529,32 @@ class Workout(models.Model):
|
|||||||
workouttype = self.workouttype
|
workouttype = self.workouttype
|
||||||
|
|
||||||
if workouttype != 'water':
|
if workouttype != 'water':
|
||||||
stri = u'{d} {n} {dist}m {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
|
try:
|
||||||
d=date.strftime('%Y-%m-%d'),
|
stri = u'{d} {n} {dist}m {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
|
||||||
n=name,
|
d=date.strftime('%Y-%m-%d'),
|
||||||
dist=distance,
|
n=name,
|
||||||
duration=duration.strftime("%H:%M:%S"),
|
dist=distance,
|
||||||
workouttype=workouttype,
|
duration=duration.strftime("%H:%M:%S"),
|
||||||
ownerfirst=ownerfirst,
|
workouttype=workouttype,
|
||||||
ownerlast=ownerlast,
|
ownerfirst=ownerfirst,
|
||||||
)
|
ownerlast=ownerlast,
|
||||||
|
)
|
||||||
|
except ValueError:
|
||||||
|
stri = 'workout'
|
||||||
else:
|
else:
|
||||||
stri = u'{d} {n} {dist}m {duration:%H:%M:%S} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
|
try:
|
||||||
d=date.strftime('%Y-%m-%d'),
|
stri = u'{d} {n} {dist}m {duration} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
|
||||||
n=name,
|
d=date.strftime('%Y-%m-%d'),
|
||||||
dist=distance,
|
n=name,
|
||||||
duration=duration,
|
dist=distance,
|
||||||
workouttype=workouttype,
|
duration=duration.strftime("%H:%M:%S"),
|
||||||
boattype=boattype,
|
workouttype=workouttype,
|
||||||
ownerfirst=ownerfirst,
|
boattype=boattype,
|
||||||
ownerlast=ownerlast,
|
ownerfirst=ownerfirst,
|
||||||
)
|
ownerlast=ownerlast,
|
||||||
|
)
|
||||||
|
except ValueError:
|
||||||
|
stri = 'workout'
|
||||||
|
|
||||||
return stri
|
return stri
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user