From 5fa54358950857d80f2b33236b1a554ca030e6ff Mon Sep 17 00:00:00 2001 From: Becky Smith Date: Wed, 3 Jan 2024 11:56:14 +0000 Subject: [PATCH] Email for experienced group --- studioadmin/views/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/studioadmin/views/users.py b/studioadmin/views/users.py index e419f5a1..e33f52cc 100644 --- a/studioadmin/views/users.py +++ b/studioadmin/views/users.py @@ -834,12 +834,12 @@ def toggle_permission(request, user_id, allowed_group_id): log=f"User {user_to_change.username} added to allowed group {allowed_group} by " f"admin user {request.user.username}" ) - if allowed_group.group.name == "Experienced": + if allowed_group.group.name.lower() == "experienced": send_mail( "Account upgraded: important information", get_template('studioadmin/email/experienced_group_permission.txt').render(), settings.DEFAULT_FROM_EMAIL, - [user_to_change], + [user_to_change.email], html_message=get_template('studioadmin/email/experienced_group_permission.html').render(), fail_silently=False )