From 7c0df89cba5f66b2d1ff692d53c3ac429f14be1a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sun, 6 Oct 2019 10:37:59 +0900 Subject: [PATCH] Fixed anime deletion (closes #240) --- arn/AnimeAPI.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arn/AnimeAPI.go b/arn/AnimeAPI.go index 16bbf59a..4b740515 100644 --- a/arn/AnimeAPI.go +++ b/arn/AnimeAPI.go @@ -111,7 +111,13 @@ func (anime *Anime) Delete() error { DB.Delete("AnimeRelations", anime.ID) // Delete anime episodes - DB.Delete("AnimeEpisodes", anime.ID) + for _, episode := range anime.Episodes() { + err := episode.Delete() + + if err != nil { + return err + } + } // Delete anime list items for animeList := range StreamAnimeLists() {