From 3a7745542259b2ef039d37a8e0b6497547ded902 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 10 Oct 2019 14:48:32 +0900 Subject: [PATCH] Improved patch --- patches/fix-nil-relations/fix-nil-relations.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/fix-nil-relations/fix-nil-relations.go b/patches/fix-nil-relations/fix-nil-relations.go index 1d7532b2..7d449808 100644 --- a/patches/fix-nil-relations/fix-nil-relations.go +++ b/patches/fix-nil-relations/fix-nil-relations.go @@ -7,9 +7,10 @@ import ( func main() { color.Yellow("Fixing non-existing anime relations") - defer color.Green("Finished.") defer arn.Node.Close() + count := 0 + for anime := range arn.StreamAnime() { relations := anime.Relations() @@ -19,6 +20,9 @@ func main() { } relations.Save() + count++ } } + + color.Green("Finished adding %d anime relations objects.", count) }