From dc772220cbc250ad98c064122597f90f487345b6 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 20 Dec 2023 23:14:03 -0600 Subject: [PATCH] Postseason bugfixes --- cogs/transactions.py | 2 +- helpers.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cogs/transactions.py b/cogs/transactions.py index 05bad17..6fdb85f 100644 --- a/cogs/transactions.py +++ b/cogs/transactions.py @@ -1610,7 +1610,7 @@ class Transactions(commands.Cog): team = await get_team_by_owner(current['season'], ctx.author.id) # team = await get_team_by_abbrev('VA', current['season']) s_query = await db_get('games', params=[ - ('season', current['season']), ('team1_id', team['id']), ('week', current['week'] + 1) + ('season', current['season']), ('team1_id', team['id']), ('week', current['week']) ]) if s_query['count'] == 0 and current['week'] != 18: await ctx.send('It looks like your season is over so transactions are locked.') diff --git a/helpers.py b/helpers.py index 667c4f9..c67e199 100644 --- a/helpers.py +++ b/helpers.py @@ -947,8 +947,10 @@ async def get_player_embed(player, current, ctx=None, season=None): if batting_string and not batter_priority: embed.add_field(name='Batting Stats', value=batting_string, inline=False) else: - b_query = await db_get('plays/batting', params=[('player_id', player['id']), ('min_wpa', 0)]) - p_query = await db_get('plays/pitching', params=[('player_id', player['id'])]) + b_query = await db_get('plays/batting', params=[ + ('player_id', player['id']), ('min_wpa', 0), ('s_type', 'regular') + ]) + p_query = await db_get('plays/pitching', params=[('player_id', player['id']), ('s_type', 'regular')]) batter_priority = True b, p, batting_string, pitching_string = None, None, None, None