Fix PotM renaming
This commit is contained in:
parent
ab706abf5b
commit
cd62e3807a
@ -166,14 +166,19 @@ async def calculate_batting_cards(offense_stats: pd.DataFrame, cardset: dict, se
|
||||
|
||||
def create_batting_card(df_data):
|
||||
logging.info(df_data['player_id'])
|
||||
s_data = cba.stealing(
|
||||
chances=int(df_data['SBO']),
|
||||
sb2s=int(df_data['SB2']),
|
||||
cs2s=int(df_data['CS2']),
|
||||
sb3s=int(df_data['SB3']),
|
||||
cs3s=int(df_data['CS3']),
|
||||
season_pct=season_pct
|
||||
)
|
||||
try:
|
||||
s_data = cba.stealing(
|
||||
chances=int(df_data['SBO']),
|
||||
sb2s=int(df_data['SB2']),
|
||||
cs2s=int(df_data['CS2']),
|
||||
sb3s=int(df_data['SB3']),
|
||||
cs3s=int(df_data['CS3']),
|
||||
season_pct=season_pct
|
||||
)
|
||||
except ValueError as e:
|
||||
print(f'Stealing error for *{df_data.name}*: {e}')
|
||||
logging.error(e)
|
||||
s_data = [0, 0, False, 0]
|
||||
batting_cards.append({
|
||||
"player_id": df_data['player_id'],
|
||||
"key_bbref": df_data.name,
|
||||
@ -290,7 +295,7 @@ async def post_player_updates(
|
||||
}
|
||||
params = []
|
||||
|
||||
if df_data['description'] != player_desc:
|
||||
if df_data['description'] != player_desc and 'potm' not in df_data['description'].lower():
|
||||
params = [('description', f'{player_desc}')]
|
||||
|
||||
if is_liveseries:
|
||||
|
||||
@ -376,7 +376,7 @@ async def post_player_updates(
|
||||
|
||||
params = []
|
||||
|
||||
if df_data['description'] != player_description:
|
||||
if df_data['description'] != player_description and 'potm' not in df_data['description'].lower():
|
||||
params = [('description', f'{player_description}')]
|
||||
|
||||
if is_liveseries:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user