Fixed anime ratings job

This commit is contained in:
Eduard Urbach 2019-10-21 13:45:28 +09:00
parent fe0babca2b
commit 1819367160
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0

View File

@ -87,8 +87,12 @@ func main() {
for animeID := range finalRating {
anime, err := arn.GetAnime(animeID)
arn.PanicOnError(err)
anime.Rating = finalRating[animeID]
if err != nil {
panic(err)
}
anime.Rating = *finalRating[animeID]
anime.Save()
}
@ -97,8 +101,12 @@ func main() {
for animeID := range popularity {
anime, err := arn.GetAnime(animeID)
arn.PanicOnError(err)
anime.Popularity = popularity[animeID]
if err != nil {
panic(err)
}
anime.Popularity = *popularity[animeID]
anime.Save()
}
}