From 3b65221e6744553a6c1d5783640df417a399343e Mon Sep 17 00:00:00 2001 From: Frederic Henrichs Date: Tue, 17 Dec 2024 09:20:11 +0100 Subject: [PATCH] backend/routes/management: convert configured_users to lowercase. This fixes users getting removed due to different casing in Email-addresses. See https://www.tinkerunity.org/topic/12612-warp3-keine-fernwartungsnutzer-speicherbar-seit-firmware%C2%A0266675aeb99/ --- backend/src/routes/management.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/routes/management.rs b/backend/src/routes/management.rs index 9f4af3a..c4f6697 100644 --- a/backend/src/routes/management.rs +++ b/backend/src/routes/management.rs @@ -84,11 +84,10 @@ async fn update_configured_users( data: &ManagementDataVersion ) -> actix_web::Result> { let configured_users = if let ManagementDataVersion::V2(data) = data { - // Get uuids of configured users on wallbox let mut configured_users: Vec = Vec::new(); for user in data.configured_users.iter() { - match get_user_id(&state, FindBy::Email(user.email.to_string())).await { + match get_user_id(&state, FindBy::Email(user.email.to_string().to_lowercase())).await { Ok(u) => { use db_connector::schema::allowed_users::dsl as allowed_users;