Skip to content

Commit

Permalink
fix: improve readability of thumbnail download logic in item data ext…
Browse files Browse the repository at this point in the history
…raction
  • Loading branch information
maehr committed Nov 22, 2024
1 parent 4a647a8 commit d9822d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ def infer_display_template(format_value):

def extract_item_data(item):
"""Extracts relevant data from an item and downloads its thumbnail if available."""
local_image_path = download_thumbnail(
item.get("thumbnail_display_urls", {}).get("large", "")
local_image_path = (
download_thumbnail(item.get("thumbnail_display_urls", {}).get("large", ""))
if item.get("o:is_public", False)
else "assets/img/placeholder.svg"
)
Expand Down

0 comments on commit d9822d6

Please sign in to comment.