From 6c084ed555203786a7e569a8f61ffc37865b1935 Mon Sep 17 00:00:00 2001 From: Kim Gustyr Date: Tue, 10 Dec 2024 13:36:01 +0000 Subject: [PATCH] fix counter --- .../management/commands/ensure_identity_traits_blanks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/edge_api/management/commands/ensure_identity_traits_blanks.py b/api/edge_api/management/commands/ensure_identity_traits_blanks.py index bfb08c73a229..78f70d22365f 100644 --- a/api/edge_api/management/commands/ensure_identity_traits_blanks.py +++ b/api/edge_api/management/commands/ensure_identity_traits_blanks.py @@ -32,6 +32,8 @@ def handle(self, *args: Any, **options: Any) -> None: should_write_identity_document = True trait_data["trait_value"] = "" + scanned_count += 1 + if should_write_identity_document: identity_wrapper.put_item(identity_document) self.stdout.write( @@ -41,7 +43,6 @@ def handle(self, *args: Any, **options: Any) -> None: f"id={identity_document['identity_uuid']}", ) - scanned_count += 1 if not (scanned_count % LOG_COUNT_EVERY): self.stdout.write( f"scanned={scanned_count}/{total_count}"