1
0
mirror of https://gitlab.crans.org/bde/nk20-scripts synced 2024-12-25 00:42:23 +00:00

Send mail to admins if a user got deleted iff it was successfully deleted

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-04-22 18:33:20 +02:00
parent 961365656c
commit 0c7070aea1
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -173,4 +173,5 @@ class Command(BaseCommand):
message += "Ont été supprimés en conséquence les objets suivants :\n\n"
for obj in deleted:
message += f"{repr(obj)} (pk: {obj.pk})\n"
mail_admins("Utilisateurs supprimés", message)
if force and kwargs['doit']:
mail_admins("Utilisateurs supprimés", message)