|
|
|
@ -849,8 +849,8 @@ def tournament_import_team_reg(request): |
|
|
|
|
|
|
|
|
|
|
|
# Delete existing relationships |
|
|
|
# Delete existing relationships |
|
|
|
# tournament.round_set.all().delete() |
|
|
|
# tournament.round_set.all().delete() |
|
|
|
# tournament.groupstage_set.all().delete() |
|
|
|
tournament.groupstage_set.all().delete() |
|
|
|
# tournament.teamregistration_set.all().delete() |
|
|
|
tournament.teamregistration_set.all().delete() |
|
|
|
|
|
|
|
|
|
|
|
with zipfile.ZipFile(zip_file) as z: |
|
|
|
with zipfile.ZipFile(zip_file) as z: |
|
|
|
# First, process rounds |
|
|
|
# First, process rounds |
|
|
|
@ -880,7 +880,7 @@ def tournament_import_team_reg(request): |
|
|
|
|
|
|
|
|
|
|
|
# Then process all other files |
|
|
|
# Then process all other files |
|
|
|
serializer_mapping = { |
|
|
|
serializer_mapping = { |
|
|
|
# 'group-stages.json': GroupStageSerializer, |
|
|
|
'group-stages.json': GroupStageSerializer, |
|
|
|
'team-registrations.json': TeamRegistrationSerializer, |
|
|
|
'team-registrations.json': TeamRegistrationSerializer, |
|
|
|
# 'matches.json': MatchSerializer, |
|
|
|
# 'matches.json': MatchSerializer, |
|
|
|
# 'player-registrations.json': PlayerRegistrationSerializer, |
|
|
|
# 'player-registrations.json': PlayerRegistrationSerializer, |
|
|
|
|