From 565bdf761afaab28967f51446b5f99efbfafd764 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 8 Apr 2020 12:14:14 +0200 Subject: [PATCH 1/3] bugs fixed, not tested --- rowers/models.py | 2 ++ rowers/tasks.py | 1 + 2 files changed, 3 insertions(+) diff --git a/rowers/models.py b/rowers/models.py index 4a70cde5..c6a1f598 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -2730,6 +2730,8 @@ class Workout(models.Model): def save(self, *args, **kwargs): user = self.user + if len(self.notes)>1000: + self.notes = notes[0:950] if not can_add_workout(user.user): raise forms.ValidationError("Free Coach User cannot have any workouts") diff --git a/rowers/tasks.py b/rowers/tasks.py index 638d9ceb..6933003a 100644 --- a/rowers/tasks.py +++ b/rowers/tasks.py @@ -2225,6 +2225,7 @@ def handle_sendemail_request(email, name, code, teamname, requestor, id, d = { 'requestor':requestor, 'teamname':teamname, + 'code': code, 'siteurl':siteurl, 'id':id, 'first_name':name, From fb0ea0ea75f0473f9dd26e849736e68296269fe1 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 8 Apr 2020 13:13:57 +0200 Subject: [PATCH 2/3] fixed and passing tests --- rowers/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rowers/models.py b/rowers/models.py index c6a1f598..d63af15c 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -2730,7 +2730,7 @@ class Workout(models.Model): def save(self, *args, **kwargs): user = self.user - if len(self.notes)>1000: + if self.notes is not None and len(self.notes)>1000: self.notes = notes[0:950] if not can_add_workout(user.user): raise forms.ValidationError("Free Coach User cannot have any workouts") From ef88f2d39e94d4ef432c4a39145be49d1a695f2f Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 8 Apr 2020 13:16:28 +0200 Subject: [PATCH 3/3] fix #529 --- rowers/interactiveplots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py index cf25d769..380088d6 100644 --- a/rowers/interactiveplots.py +++ b/rowers/interactiveplots.py @@ -4830,7 +4830,7 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line', plot.add_tools(HoverTool(renderers=[l1[cntr]],tooltips=TIPS)) cntr += 1 - plot.legend.location='bottom_right' + plot.legend.location='top_right' plot.xaxis.axis_label = axlabels[xparam] plot.yaxis.axis_label = axlabels[yparam]