added alternative summoner name fields

This commit is contained in:
Netali 2021-05-15 16:09:48 +02:00
parent a21672c4aa
commit 87e6c8eb08
1 changed files with 8 additions and 0 deletions

View File

@ -32,6 +32,14 @@ def show_match(tournament_id, match_id):
'query': ','.join(summoner_names) 'query': ','.join(summoner_names)
} }
participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params) participant['opgg_multilink'] = urllib.parse.urlencode(multilink_params)
elif 'beschwoerername' in participant['lineup'][0]['custom_fields']:
for idx, _ in enumerate(participant['lineup']):
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
participant['lineup'][0]['custom_fields']
elif participant['lineup'][0]['custom_fields'] == {}:
for idx, _ in enumerate(participant['lineup']):
participant['lineup'][idx]['custom_fields']['summoner_name'] = \
participant['lineup'][idx]['name']
else: else:
for idx, _ in enumerate(participant['lineup']): for idx, _ in enumerate(participant['lineup']):
participant['lineup'][idx]['custom_fields']['summoner_name'] = 'N/V' participant['lineup'][idx]['custom_fields']['summoner_name'] = 'N/V'