diff --git a/tournaments/services/tournament_registration.py b/tournaments/services/tournament_registration.py index 44d8b86..659f1cf 100644 --- a/tournaments/services/tournament_registration.py +++ b/tournaments/services/tournament_registration.py @@ -418,6 +418,12 @@ class RegistrationCartManager: except ValueError: tournament_played = None + points = player_data.get('points') + try: + points = float(points) + except ValueError: + points = None + # Create player registration with all the original fields PlayerRegistration.objects.create( team_registration=team_registration, @@ -427,7 +433,7 @@ class RegistrationCartManager: registered_online=True, first_name=player_data.get('first_name'), last_name=player_data.get('last_name'), - points=player_data.get('points'), + points=points, assimilation=player_data.get('assimilation'), tournament_played=tournament_played, ligue_name=player_data.get('ligue_name'),