Skip to content

Commit

Permalink
hotfix: management api returning email objects rather than strings
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoMcA committed Oct 29, 2020
1 parent 46f948a commit eba4269
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mozilla_iam/api/management.rb
Expand Up @@ -22,7 +22,7 @@ class Profile
def initialize(raw)
@raw = raw
@groups = Array(raw[:groups]) | Array(raw.dig(:app_metadata, :groups))
@secondary_emails = Array(raw[:email_aliases])
@secondary_emails = Array(raw[:email_aliases]).map { |x| x.is_a?(String) ? x : x[:value] }
@email = raw[:email]
end
end
Expand Down

0 comments on commit eba4269

Please sign in to comment.