aboutsummaryrefslogtreecommitdiff
path: root/detail
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-10-04 20:23:26 -0400
committerBobby <[email protected]>2024-10-04 20:23:26 -0400
commitdaae3a3aeb0e62c42e624f090dedde9f9a723b76 (patch)
tree5c58c65e176ad65ab3a59967e5f89858c7b3b995 /detail
parentb3c5e2238c75760c60ba568d992031c61b14a2b9 (diff)
downloadyugen-daae3a3aeb0e62c42e624f090dedde9f9a723b76.tar.xz
yugen-daae3a3aeb0e62c42e624f090dedde9f9a723b76.zip
clean up for wrong ids
Diffstat (limited to 'detail')
-rw-r--r--detail/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/detail/views.py b/detail/views.py
index fddbbde..776e2dd 100644
--- a/detail/views.py
+++ b/detail/views.py
@@ -8,6 +8,9 @@ def index(request):
def anime(request, anime_id):
anime_data = get_anime_data(anime_id, provider="zoro")
+ if not anime_data:
+ return redirect("home:index")
+
if "status" in anime_data and anime_data["status"] != "Not yet aired":
anime_episodes = anime_data["episodes"]
anime_episodes = attach_episode_metadata(anime_data, anime_episodes)