Fix column reference "full_name" is ambiguous
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -450,7 +450,8 @@ WITH mbr AS (
|
|||||||
identity_id = @identity_id
|
identity_id = @identity_id
|
||||||
AND state = 'ACTIVE'
|
AND state = 'ACTIVE'
|
||||||
AND %s
|
AND %s
|
||||||
)
|
),
|
||||||
|
r AS (
|
||||||
SELECT
|
SELECT
|
||||||
mbr.id,
|
mbr.id,
|
||||||
mbr.identity_id,
|
mbr.identity_id,
|
||||||
@@ -471,6 +472,21 @@ JOIN
|
|||||||
organizations o ON mbr.organization_id = o.id
|
organizations o ON mbr.organization_id = o.id
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
iam_membership_profiles mp ON mp.membership_id = mbr.id
|
iam_membership_profiles mp ON mp.membership_id = mbr.id
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
identity_id,
|
||||||
|
organization_id,
|
||||||
|
role,
|
||||||
|
source,
|
||||||
|
state,
|
||||||
|
full_name,
|
||||||
|
email_address,
|
||||||
|
organization_name,
|
||||||
|
created_at,
|
||||||
|
updated_at
|
||||||
|
FROM
|
||||||
|
r
|
||||||
WHERE
|
WHERE
|
||||||
%s
|
%s
|
||||||
`
|
`
|
||||||
@@ -521,7 +537,8 @@ WITH m AS (
|
|||||||
WHERE
|
WHERE
|
||||||
organization_id = @organization_id
|
organization_id = @organization_id
|
||||||
AND %s
|
AND %s
|
||||||
)
|
),
|
||||||
|
r AS (
|
||||||
SELECT
|
SELECT
|
||||||
m.id,
|
m.id,
|
||||||
m.identity_id,
|
m.identity_id,
|
||||||
@@ -544,7 +561,23 @@ LEFT JOIN
|
|||||||
iam_membership_profiles mp ON mp.membership_id = m.id
|
iam_membership_profiles mp ON mp.membership_id = m.id
|
||||||
WHERE
|
WHERE
|
||||||
%s
|
%s
|
||||||
AND %s
|
)
|
||||||
|
SELECT
|
||||||
|
id,
|
||||||
|
identity_id,
|
||||||
|
organization_id,
|
||||||
|
role,
|
||||||
|
source,
|
||||||
|
state,
|
||||||
|
full_name,
|
||||||
|
organization_name,
|
||||||
|
email_address,
|
||||||
|
created_at,
|
||||||
|
updated_at
|
||||||
|
FROM
|
||||||
|
r
|
||||||
|
WHERE
|
||||||
|
%s
|
||||||
`
|
`
|
||||||
|
|
||||||
query = fmt.Sprintf(query, scope.SQLFragment(), filter.SQLFragment(), cursor.SQLFragment())
|
query = fmt.Sprintf(query, scope.SQLFragment(), filter.SQLFragment(), cursor.SQLFragment())
|
||||||
|
|||||||
Reference in New Issue
Block a user