coalesce nil UUID for null agreement
This commit is contained in:
@@ -53,12 +53,12 @@ async function getEvent(client, userId, id, includeData, meta) {
|
||||
'senderId', e.sender_id,
|
||||
'recipientId', e.recipient_id,
|
||||
'created', e.created,
|
||||
'agreementId', (
|
||||
'agreementId', COALESCE((
|
||||
SELECT a.agreement_id_uuid
|
||||
FROM agreement a
|
||||
WHERE a.id = e.agreement_id
|
||||
AND a.user_id = $1
|
||||
),
|
||||
), '00000000-0000-0000-0000-000000000000'),
|
||||
${dataSql}
|
||||
'created', e.created
|
||||
) AS record
|
||||
|
||||
Reference in New Issue
Block a user