Update tournament_registration.py

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

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

Loading…
Cancel
Save