From 90b1e989389f488a8d4a1657394c1cc0b635d58d Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 21 Dec 2021 10:42:59 +0100 Subject: [PATCH] fix unable to link address from sso --- app/models/user.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 78122042c..6ef1985c3 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -264,12 +264,15 @@ class User < ApplicationRecord profile.user_avatar ||= UserAvatar.new profile.user_avatar.remote_attachment_url = data when 'profile.address' + invoicing_profile ||= InvoicingProfile.new invoicing_profile.address ||= Address.new invoicing_profile.address.address = data when 'profile.organization_name' + invoicing_profile ||= InvoicingProfile.new invoicing_profile.organization ||= Organization.new invoicing_profile.organization.name = data when 'profile.organization_address' + invoicing_profile ||= InvoicingProfile.new invoicing_profile.organization ||= Organization.new invoicing_profile.organization.address ||= Address.new invoicing_profile.organization.address.address = data