From c37bfc7349b3857811b7a3f233b644a815465b11 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 4 Nov 2019 18:32:56 +0100 Subject: [PATCH] instructeurs: fix email casing in invitation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When inviting an instructeur, the code first looked up an existing instructeur using the normalized (downcased) email address–but then tried to promote it using the non-normalized version, which failed. This fixes the issue by always using the normalized email. --- app/controllers/admin/instructeurs_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/instructeurs_controller.rb b/app/controllers/admin/instructeurs_controller.rb index fd35b15b5..5a179eac5 100644 --- a/app/controllers/admin/instructeurs_controller.rb +++ b/app/controllers/admin/instructeurs_controller.rb @@ -15,7 +15,7 @@ class Admin::InstructeursController < AdminController procedure_id = params[:procedure_id] if @instructeur.nil? - invite_instructeur(params[:instructeur][:email]) + invite_instructeur(email) else assign_instructeur! end