Players bug fix

This commit is contained in:
Cal Corum 2025-05-29 22:19:34 -05:00
parent 2791e1964b
commit adaa8206c8

View File

@ -403,7 +403,8 @@ async def get_batter_card(
raise HTTPException(status_code=404, detail=f'Ratings not found for batting card {this_bc.id}')
card_data = get_batter_card_data(this_player, this_bc, rating_vl, rating_vr, all_pos)
if this_player.description in this_player.cardset.name:
# Include Pokemon cardsets here to remove "Pokemon" from cardset name on card
if this_player.description in this_player.cardset.name and this_player.cardset.id not in [23]:
card_data['cardset_name'] = this_player.cardset.name
else:
card_data['cardset_name'] = this_player.description
@ -424,7 +425,7 @@ async def get_batter_card(
raise HTTPException(status_code=404, detail=f'Ratings not found for pitching card {this_pc.id}')
card_data = get_pitcher_card_data(this_player, this_pc, rating_vl, rating_vr, all_pos)
if this_player.description in this_player.cardset.name:
if this_player.description in this_player.cardset.name and this_player.cardset.id not in [23]:
card_data['cardset_name'] = this_player.cardset.name
else:
card_data['cardset_name'] = this_player.description