Skip to content

Commit

Permalink
Adding empty urls handler (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
animemoeus committed Sep 22, 2024
1 parent 948f783 commit 45ca0e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions waifu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def refresh_serializer_data_urls(data: list[dict]) -> list[dict]:
if "media.discordapp.net" in item.get("thumbnail", ""):
urls.append(item.get("thumbnail"))

if not urls:
return data

refreshed_urls = refresh_expired_urls(urls)

for item in data:
Expand Down

0 comments on commit 45ca0e1

Please sign in to comment.