Log mlbplayer dupes

Update cardsets for season 8
This commit is contained in:
Cal Corum 2024-11-02 23:44:32 -05:00
parent 2a2961983a
commit 17416cd50f
2 changed files with 23 additions and 15 deletions

View File

@ -27,37 +27,37 @@ logging.basicConfig(
)
# 2024, 2018
ranked_cardsets = [17, 18, 19, 13, 14]
LIVE_CARDSET_ID = 17
LIVE_PROMO_CARDSET_ID = 18
ranked_cardsets = [20, 21, 22, 17, 18, 19]
LIVE_CARDSET_ID = 20
LIVE_PROMO_CARDSET_ID = 21
CARDSETS = {
'ranked': {
'primary': ranked_cardsets,
'human': ranked_cardsets
},
'minor-league': {
'primary': [17, 8], # 2024, Mario
'secondary': [13], # 2018
'human': [x for x in range(1, 20)]
'primary': [20, 8], # 1998, Mario
'secondary': [17], # 2024
'human': [x for x in range(1, 30)]
},
'major-league': {
'primary': [17, 18, 13, 11, 7, 8], # 2024, 24 Promos, 2018, 2016, 2012, Mario
'secondary': [9, 3], # 2023, 2022
'primary': [20, 21, 17, 18, 12, 6, 7, 8], # 1998, 1998 Promos, 2024, 24 Promos, 2008, 2013, 2012, Mario
'secondary': [5, 3], # 2019, 2022
'human': ranked_cardsets
},
'hall-of-fame': {
'primary': [x for x in range(1, 20)],
'primary': [x for x in range(1, 30)],
'human': ranked_cardsets
},
'flashback': {
'primary': [11, 7, 6, 12], # 2016, 2012, 2013, 2008, Mario
'secondary': [13, 5], # 2018, 2019
'human': [12, 7, 6, 11] # 2008, 2012, 2013, 2016
'primary': [5, 1, 3, 9, 8], # 2019, 2021, 2022, 2023, Mario
'secondary': [13, 5], # 2018, 2019
'human': [5, 1, 3, 9, 8] # 2019, 2021, 2022, 2023
},
'gauntlet-3': {
'primary': [13], # 2018
'secondary': [5, 11, 9], # 2019, 2016, 2023
'human': [x for x in range(1, 20)]
'human': [x for x in range(1, 30)]
},
'gauntlet-4': {
'primary': [3, 6, 16], # 2022, 2013, Backyard Baseball
@ -66,8 +66,13 @@ CARDSETS = {
},
'gauntlet-5': {
'primary': [17, 8], # 2024, Mario
'secondary': [13], # 2018
'human': [x for x in range(1, 20)]
'secondary': [13], # 2018
'human': [x for x in range(1, 30)]
},
'gauntlet-6': {
'primary': [20, 8], # 1998, Mario
'secondary': [12], # 2008
'human': [x for x in range(1, 30)]
}
}

View File

@ -203,6 +203,9 @@ async def post_one_player(player: PlayerModel, token: str = Depends(oauth2_schem
(MlbPlayer.key_bbref == player.key_bbref)
)
if dupes.count() > 0:
logging.info(f'POST /mlbplayers/one - dupes found:')
for x in dupes:
logging.info(f'{x}')
db.close()
raise HTTPException(
status_code=400,