fixed broken summoner_name field
This commit is contained in:
parent
2707fad57f
commit
9824add40e
|
@ -24,12 +24,16 @@ def show_match(tournament_id, match_id):
|
||||||
participants = list()
|
participants = list()
|
||||||
for opponent in match['opponents']:
|
for opponent in match['opponents']:
|
||||||
participant = toornament.get_participant(tournament_id, opponent['participant']['id'])
|
participant = toornament.get_participant(tournament_id, opponent['participant']['id'])
|
||||||
summoner_names = list()
|
if 'summoner_name' in participant['lineup'][0]['custom_fields']:
|
||||||
for player in participant['lineup']:
|
summoner_names = list()
|
||||||
summoner_names.append(player['custom_fields']['summoner_name'])
|
for player in participant['lineup']:
|
||||||
multilink_params = {
|
summoner_names.append(player['custom_fields']['summoner_name'])
|
||||||
'query': ','.join(summoner_names)
|
multilink_params = {
|
||||||
}
|
'query': ','.join(summoner_names)
|
||||||
participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params)
|
}
|
||||||
|
participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params)
|
||||||
|
else:
|
||||||
|
for idx, _ in enumerate(participant['lineup']):
|
||||||
|
participant['lineup'][idx]['custom_fields']['summoner_name'] = 'N/V'
|
||||||
participants.append(participant)
|
participants.append(participant)
|
||||||
return render_template('match.html', match=match, participants=participants, tournament=tournament)
|
return render_template('match.html', match=match, participants=participants, tournament=tournament)
|
||||||
|
|
Loading…
Reference in New Issue