Update tournament_registration.py

sync_v2
Razmig Sarkissian 5 months ago
parent af83311c9d
commit aa73c904a4
  1. 10
      tournaments/services/tournament_registration.py

@ -412,17 +412,23 @@ class RegistrationCartManager:
else:
sex = None
tournament_count = player_data.get('tournament_count')
tournament_count = player_data.get('tournament_count', None)
if tournament_count is not None:
try:
tournament_played = int(tournament_count)
except ValueError:
tournament_played = None
else:
tournament_played = None
points = player_data.get('points')
points = player_data.get('points', None)
if points is not None:
try:
points = float(points)
except ValueError:
points = None
else:
points = None
# Create player registration with all the original fields
PlayerRegistration.objects.create(

Loading…
Cancel
Save