diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-16 20:02:53 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-16 20:02:53 +0100 |
commit | 47e5798cdae59ac4bfe0f890eb3d6f48f0b30097 (patch) | |
tree | 16ad04b1ce8ce788d8fb5dc897aa26d756a55109 /ishtar_common/management | |
parent | fb77a14ba933d4f5ae62ea76e41ecfc01f79ae78 (diff) | |
download | Ishtar-47e5798cdae59ac4bfe0f890eb3d6f48f0b30097.tar.bz2 Ishtar-47e5798cdae59ac4bfe0f890eb3d6f48f0b30097.zip |
Update search vectors script: fix total
Diffstat (limited to 'ishtar_common/management')
-rw-r--r-- | ishtar_common/management/commands/update_search_vectors.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ishtar_common/management/commands/update_search_vectors.py b/ishtar_common/management/commands/update_search_vectors.py index 59166fba7..a07da721e 100644 --- a/ishtar_common/management/commands/update_search_vectors.py +++ b/ishtar_common/management/commands/update_search_vectors.py @@ -21,7 +21,7 @@ class Command(BaseCommand): def handle(self, *args, **options): quiet = options['quiet'] - total = 0 + nb_total = 0 for model in django.apps.apps.get_models(): if options['model'] and model.__name__ != options['model']: continue @@ -42,7 +42,7 @@ class Command(BaseCommand): item.update_search_vector() except: pass - total += idx + nb_total += idx if not quiet: self.stdout.write("\n") - self.stdout.write("{} items updated\n".format(total)) + self.stdout.write("{} items updated\n".format(nb_total)) |