checking name length and truncating
This commit is contained in:
@@ -1272,6 +1272,10 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
message = "Warning: This workout overlaps with an existing one and was marked as a duplicate"
|
message = "Warning: This workout overlaps with an existing one and was marked as a duplicate"
|
||||||
duplicate = True
|
duplicate = True
|
||||||
|
|
||||||
|
# test title length
|
||||||
|
if len(title)>149:
|
||||||
|
title = title[0:149]
|
||||||
|
|
||||||
|
|
||||||
w = Workout(user=r, name=title, date=workoutdate,
|
w = Workout(user=r, name=title, date=workoutdate,
|
||||||
workouttype=workouttype,
|
workouttype=workouttype,
|
||||||
|
|||||||
Reference in New Issue
Block a user