diff --git a/management/commands/import_account.py b/management/commands/import_account.py index 9dc6371..d520187 100644 --- a/management/commands/import_account.py +++ b/management/commands/import_account.py @@ -246,20 +246,7 @@ class Command(ImportCommand): filename = kwargs["save"] with open(filename, 'w') as fp: json.dump(MAP_IDBDE, fp, sort_keys=True, indent=2) - - for pk_user, old_username, new_username in CHANGED_USERNAMES: - user = User.objects.get(pk=pk_user) - mail_text = render_to_string("scripts/unsupported_username.txt", dict( - user=user, - old_username=old_username, - new_username=new_username, - )) - user.email_user("Transition à la Note Kfet 2020 : pseudo non supporté", mail_text) - - for pk_user, aliases_list in CHANGED_USERNAMES: - user = User.objects.get(pk=pk_user) - mail_text = render_to_string("scripts/deleted_aliases.txt", dict( - user=user, - aliases_list=aliases_list, - )) - user.email_user("Transition à la Note Kfet 2020 : suppression d'alias", mail_text) + with open(filename + ".changed-usernames", 'w') as fp: + json.dump(CHANGED_USERNAMES, fp, sort_keys=True, indent=2) + with open(filename + ".removed-aliases", 'w') as fp: + json.dump(LOST_ALIASES, fp, sort_keys=True, indent=2)