fix: Avoid SequelizeEmptyResultError when team is missing in CollectionsProcessor (#12837)

Drop rejectOnEmpty so a deleted team yields null and the existing optional
chaining guard short-circuits the no-op transaction.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom MoorandClaude Opus 4.8 authored and GitHub committed 2026-06-25 20:49:09 -04:00
1 parent 6a81426181
commit 7b809ab48c
1 file changed
-1
@@ -21,7 +21,6 @@ export default class CollectionsProcessor extends BaseProcessor {
await sequelize.transaction(async (transaction) => {
const team = await Team.findByPk(event.teamId, {
rejectOnEmpty: true,
transaction,
lock: transaction.LOCK.UPDATE,
});