Log mlbplayer dupes
Update cardsets for season 8
This commit is contained in:
parent
2a2961983a
commit
17416cd50f
@ -27,37 +27,37 @@ logging.basicConfig(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# 2024, 2018
|
# 2024, 2018
|
||||||
ranked_cardsets = [17, 18, 19, 13, 14]
|
ranked_cardsets = [20, 21, 22, 17, 18, 19]
|
||||||
LIVE_CARDSET_ID = 17
|
LIVE_CARDSET_ID = 20
|
||||||
LIVE_PROMO_CARDSET_ID = 18
|
LIVE_PROMO_CARDSET_ID = 21
|
||||||
CARDSETS = {
|
CARDSETS = {
|
||||||
'ranked': {
|
'ranked': {
|
||||||
'primary': ranked_cardsets,
|
'primary': ranked_cardsets,
|
||||||
'human': ranked_cardsets
|
'human': ranked_cardsets
|
||||||
},
|
},
|
||||||
'minor-league': {
|
'minor-league': {
|
||||||
'primary': [17, 8], # 2024, Mario
|
'primary': [20, 8], # 1998, Mario
|
||||||
'secondary': [13], # 2018
|
'secondary': [17], # 2024
|
||||||
'human': [x for x in range(1, 20)]
|
'human': [x for x in range(1, 30)]
|
||||||
},
|
},
|
||||||
'major-league': {
|
'major-league': {
|
||||||
'primary': [17, 18, 13, 11, 7, 8], # 2024, 24 Promos, 2018, 2016, 2012, Mario
|
'primary': [20, 21, 17, 18, 12, 6, 7, 8], # 1998, 1998 Promos, 2024, 24 Promos, 2008, 2013, 2012, Mario
|
||||||
'secondary': [9, 3], # 2023, 2022
|
'secondary': [5, 3], # 2019, 2022
|
||||||
'human': ranked_cardsets
|
'human': ranked_cardsets
|
||||||
},
|
},
|
||||||
'hall-of-fame': {
|
'hall-of-fame': {
|
||||||
'primary': [x for x in range(1, 20)],
|
'primary': [x for x in range(1, 30)],
|
||||||
'human': ranked_cardsets
|
'human': ranked_cardsets
|
||||||
},
|
},
|
||||||
'flashback': {
|
'flashback': {
|
||||||
'primary': [11, 7, 6, 12], # 2016, 2012, 2013, 2008, Mario
|
'primary': [5, 1, 3, 9, 8], # 2019, 2021, 2022, 2023, Mario
|
||||||
'secondary': [13, 5], # 2018, 2019
|
'secondary': [13, 5], # 2018, 2019
|
||||||
'human': [12, 7, 6, 11] # 2008, 2012, 2013, 2016
|
'human': [5, 1, 3, 9, 8] # 2019, 2021, 2022, 2023
|
||||||
},
|
},
|
||||||
'gauntlet-3': {
|
'gauntlet-3': {
|
||||||
'primary': [13], # 2018
|
'primary': [13], # 2018
|
||||||
'secondary': [5, 11, 9], # 2019, 2016, 2023
|
'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': {
|
'gauntlet-4': {
|
||||||
'primary': [3, 6, 16], # 2022, 2013, Backyard Baseball
|
'primary': [3, 6, 16], # 2022, 2013, Backyard Baseball
|
||||||
@ -66,8 +66,13 @@ CARDSETS = {
|
|||||||
},
|
},
|
||||||
'gauntlet-5': {
|
'gauntlet-5': {
|
||||||
'primary': [17, 8], # 2024, Mario
|
'primary': [17, 8], # 2024, Mario
|
||||||
'secondary': [13], # 2018
|
'secondary': [13], # 2018
|
||||||
'human': [x for x in range(1, 20)]
|
'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)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -203,6 +203,9 @@ async def post_one_player(player: PlayerModel, token: str = Depends(oauth2_schem
|
|||||||
(MlbPlayer.key_bbref == player.key_bbref)
|
(MlbPlayer.key_bbref == player.key_bbref)
|
||||||
)
|
)
|
||||||
if dupes.count() > 0:
|
if dupes.count() > 0:
|
||||||
|
logging.info(f'POST /mlbplayers/one - dupes found:')
|
||||||
|
for x in dupes:
|
||||||
|
logging.info(f'{x}')
|
||||||
db.close()
|
db.close()
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=400,
|
status_code=400,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user