diff options
| author | Bobby <[email protected]> | 2024-10-04 20:23:26 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-10-04 20:23:26 -0400 |
| commit | daae3a3aeb0e62c42e624f090dedde9f9a723b76 (patch) | |
| tree | 5c58c65e176ad65ab3a59967e5f89858c7b3b995 /detail | |
| parent | b3c5e2238c75760c60ba568d992031c61b14a2b9 (diff) | |
| download | yugen-daae3a3aeb0e62c42e624f090dedde9f9a723b76.tar.xz yugen-daae3a3aeb0e62c42e624f090dedde9f9a723b76.zip | |
clean up for wrong ids
Diffstat (limited to 'detail')
| -rw-r--r-- | detail/views.py | 3 |
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) |
