Private
Public Access
1
0

improving course compare

This commit is contained in:
2024-11-11 11:43:18 +01:00
parent 29749a9306
commit de16a237fc
6 changed files with 65 additions and 9 deletions

View File

@@ -3727,6 +3727,18 @@ class Workout(models.Model):
elif self.workouttype in mytypes.otetypes and self.boattype in mytypes.boattypes:
self.boattype = 'static'
records = VirtualRaceResult.objects.filter(workoutid=self.pk)
for record in records:
record.boattype = self.boattype
record.boatclass = self.workouttype
record.save()
records = IndoorVirtualRaceResult.objects.filter(workoutid=self.pk)
for record in records:
record.boattype = self.boattype
record.boatclass = self.workouttype
record.save()
super(Workout, self).save(*args, **kwargs)
def __str__(self):