|
|
|
|
@ -412,16 +412,22 @@ class RegistrationCartManager: |
|
|
|
|
else: |
|
|
|
|
sex = None |
|
|
|
|
|
|
|
|
|
tournament_count = player_data.get('tournament_count') |
|
|
|
|
try: |
|
|
|
|
tournament_played = int(tournament_count) |
|
|
|
|
except ValueError: |
|
|
|
|
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') |
|
|
|
|
try: |
|
|
|
|
points = float(points) |
|
|
|
|
except ValueError: |
|
|
|
|
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 |
|
|
|
|
|