From 0e4aa8e7849ec409f5a464e23fc1ca8a556b74f1 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Mon, 24 Jan 2022 15:14:35 +0100 Subject: [PATCH] sync-tabellio: add debug output (#61005) --- docbow_project/pfwb/management/commands/sync-tabellio.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docbow_project/pfwb/management/commands/sync-tabellio.py b/docbow_project/pfwb/management/commands/sync-tabellio.py index 7571519..d06d967 100644 --- a/docbow_project/pfwb/management/commands/sync-tabellio.py +++ b/docbow_project/pfwb/management/commands/sync-tabellio.py @@ -59,7 +59,10 @@ def get_or_create_user(last_name, first_name, email, verbose, tabellio_id): # address. user.email = email - user.is_active = True + if not user.is_active: + if verbose: + print('enabling', user.username) + user.is_active = True user.save() if not profile: @@ -67,6 +70,8 @@ def get_or_create_user(last_name, first_name, email, verbose, tabellio_id): profile, created = DocbowProfile.objects.get_or_create(user=user) if profile.external_id != tabellio_id: + if verbose: + print('updating external_id', user.username, tabellio_id) profile.external_id = tabellio_id profile.save()