Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: fix new receipts push task fallings #5715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const prepareAndSendNotification = async (keystone, context, receipt, resident,
const category = getLocalized(locale, receipt.category.nameNonLocalized)
const currencyCode = get(context, 'integration.currencyCode', DEFAULT_CURRENCY_CODE)
const { messageType, debt } = getMessageTypeAndDebt(toPay, toPayCharge)
let organizationId = null

if (resident.organization) {
organizationId = { id: resident.organization }
}

const data = {
residentId: resident.id,
Expand All @@ -73,7 +78,7 @@ const prepareAndSendNotification = async (keystone, context, receipt, resident,
meta: { dv: 1, data },
sender: { dv: 1, fingerprint: 'send-billing-receipts-added-notifications' },
uniqKey: notificationKey,
organization: { id: resident.organization },
organization: organizationId,
}
logger.info({ msg: 'New receipt push data', data: { messageData } })

Expand Down
Loading