sync-tabellio: add debug output (#61005)

This commit is contained in:
Emmanuel Cazenave 2022-01-24 15:14:35 +01:00
parent 964a28b2dd
commit 0e4aa8e784
1 changed files with 6 additions and 1 deletions

View File

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