1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

(bug) Unable to import accounts from SSO

When the transformation modal was opened but leaved empty, the field
mapping.transformation.type is defined but not
mapping.transformation.mapping, which result in the following error:

NoMethodError (undefined method `each' for nil:NilClass):

lib/omni_auth/data_mapping/base.rb:16:in `map_transformation'
This commit is contained in:
Sylvain 2022-07-11 12:32:22 +02:00
parent 272e105f5a
commit 784aa93e30
2 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@
## next deploy
- Fix a bug: Unable to import accounts from SSO when the transformation modal was opened but leaved empty
## v5.4.12 2022 July 06
- Fix a bug: Gender, Address and Birthday are not mapped properly from SSO (#365)

View File

@ -13,7 +13,7 @@ module OmniAuth::DataMapping
def map_transformation(transformation, raw_data)
value = nil
transformation['mapping'].each do |m|
transformation['mapping']&.each do |m|
if m['from'] == raw_data
value = m['to']
break