From e68b588262b891cf0a5be45f0255f5dd569ce773 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Sun, 1 Mar 2020 12:00:01 +0100 Subject: [PATCH] checking name length and truncating --- rowers/dataprep.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rowers/dataprep.py b/rowers/dataprep.py index a17281ab..6979f86c 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -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" duplicate = True + # test title length + if len(title)>149: + title = title[0:149] + w = Workout(user=r, name=title, date=workoutdate, workouttype=workouttype,