Fixed anime deletion (closes #240)
This commit is contained in:
parent
63b5e637e4
commit
7c0df89cba
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user