Join identities in MembershipProfiles.LoadExistingByIDs
SCIM event CSV exports failed with "cannot parse address : mail: no address" because this query selected a placeholder empty string for email_address instead of the real address, and scanning it into mail.Addr tried to parse it as one. Join identities the same way every other MembershipProfile query already does, and drop the redundant identity lookup in the SCIM export path now that profiles carry their real email address. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -506,7 +506,7 @@ SELECT
|
||||
p.id,
|
||||
p.identity_id,
|
||||
p.organization_id,
|
||||
''::citext AS email_address,
|
||||
i.email_address,
|
||||
p.source,
|
||||
p.state,
|
||||
p.full_name,
|
||||
@@ -541,6 +541,8 @@ SELECT
|
||||
p.updated_at
|
||||
FROM
|
||||
iam_membership_profiles p
|
||||
INNER JOIN identities i
|
||||
ON i.id = p.identity_id
|
||||
WHERE
|
||||
p.%s
|
||||
AND p.id = ANY(@profile_ids)
|
||||
|
||||
Reference in New Issue
Block a user