diff --git a/cogs/transactions.py b/cogs/transactions.py index a386ca9..35dd8c3 100644 --- a/cogs/transactions.py +++ b/cogs/transactions.py @@ -469,11 +469,15 @@ class Transactions(commands.Cog): else: new_team = move['newteam'] # team_record = await get_team_record(new_team, week_num=current["week"]) - r_query = await db_get('standings', params=[ - ('season', current['season']), ('team_id', new_team['id']) - ]) - win_pct = r_query['standings'][0]['wins'] / ( - r_query['standings'][0]['wins'] + r_query['standings'][0]['losses']) + + if new_team['abbrev'] == 'FA': + win_pct = 0 + else: + r_query = await db_get('standings', params=[ + ('season', current['season']), ('team_id', new_team['id']) + ]) + win_pct = r_query['standings'][0]['wins'] / ( + r_query['standings'][0]['wins'] + r_query['standings'][0]['losses']) tiebreaker = win_pct + (random.randint(10000, 99999) * .00000001) if move["player"]["name"] not in added_players.keys():