update => update!

This commit is contained in:
Mathieu Magnin 2024-09-06 15:37:33 +02:00
parent 22473adec7
commit 628be7c703
No known key found for this signature in database
GPG key ID: 8DCAFC82D7BA654E

View file

@ -31,8 +31,8 @@ class AgentConnect::AgentController < ApplicationController
instructeur = user.instructeur
end
instructeur.update(agent_connect_id_token: id_token)
instructeur.user.update(email_verified_at: Time.zone.now)
instructeur.update!(agent_connect_id_token: id_token)
instructeur.user.update!(email_verified_at: Time.zone.now)
aci = AgentConnectInformation.find_or_initialize_by(instructeur:, sub: user_info['sub'])
aci.update(user_info.slice('given_name', 'usual_name', 'email', 'sub', 'siret', 'organizational_unit', 'belonging_population', 'phone'))