Update transactions.py
Fix MiL freeze bug
This commit is contained in:
parent
0ae150d36e
commit
600419c035
@ -404,7 +404,11 @@ class Transactions(commands.Cog):
|
||||
contested_players = {}
|
||||
|
||||
for move in [*all_moves.values()]:
|
||||
team_record = await get_team_record(move['newteam'], week_num=current["week"])
|
||||
if move['newteam']['abbrev'][-3:] == 'MiL':
|
||||
new_team = get_one_team(move['newteam']['abbrev'][-3:], timeout=15)
|
||||
else:
|
||||
new_team = move['newteam']
|
||||
team_record = await get_team_record(new_team, week_num=current["week"])
|
||||
tiebreaker = team_record["pct"] + (random.randint(10000, 99999) * .00000001)
|
||||
if move["player"]["name"] not in added_players.keys():
|
||||
added_players[move["player"]["name"]] = [[move["player"], move["newteam"], tiebreaker, move["moveid"]]]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user