fix: review feedback — pin boto3, use player_id consistently, add comment
- Pin boto3==1.42.65 to match project convention of exact version pins - Use player_id (not player) for FK column access in card_storage.py to match the pattern used throughout the codebase - Add comment explaining the tier is None guard in S3 upload scheduling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
be8bebe663
commit
f4a90da629
@ -915,7 +915,9 @@ async def get_batter_card(
|
||||
# save_as=f'{player_id}-{d}-v{variant}.png'
|
||||
# )
|
||||
|
||||
# Schedule S3 upload for variant cards that don't have an image_url yet
|
||||
# Schedule S3 upload for variant cards that don't have an image_url yet.
|
||||
# Skip when tier is overridden (?tier= dev preview) — those renders don't
|
||||
# correspond to real variant card rows.
|
||||
if variant > 0 and tier is None:
|
||||
CardModel = BattingCard if card_type == "batting" else PitchingCard
|
||||
try:
|
||||
|
||||
@ -174,11 +174,11 @@ def backfill_variant_image_url(
|
||||
# 4. Locate the card row and update image_url
|
||||
if card_type == "batting":
|
||||
card = BattingCard.get(
|
||||
BattingCard.player == player_id, BattingCard.variant == variant
|
||||
BattingCard.player_id == player_id, BattingCard.variant == variant
|
||||
)
|
||||
else:
|
||||
card = PitchingCard.get(
|
||||
PitchingCard.player == player_id, PitchingCard.variant == variant
|
||||
PitchingCard.player_id == player_id, PitchingCard.variant == variant
|
||||
)
|
||||
|
||||
card.image_url = image_url
|
||||
|
||||
@ -12,4 +12,4 @@ requests==2.32.3
|
||||
html2image==2.0.6
|
||||
jinja2==3.1.4
|
||||
playwright==1.45.1
|
||||
boto3>=1.34.0
|
||||
boto3==1.42.65
|
||||
|
||||
Loading…
Reference in New Issue
Block a user