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()