Private
Public Access
1
0

fixed and passing tests

This commit is contained in:
Sander Roosendaal
2020-04-08 13:13:57 +02:00
parent 565bdf761a
commit fb0ea0ea75

View File

@@ -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")