diff --git a/server/lib/security/expense.ts b/server/lib/security/expense.ts index 265f45b8848..66d7dea008d 100644 --- a/server/lib/security/expense.ts +++ b/server/lib/security/expense.ts @@ -460,7 +460,7 @@ export const checkExpensesBatch = async ( // Check if this Payout Method is being used by someone other user or collective const similarPayoutMethods = await expense.PayoutMethod.findSimilar({ include: [{ model: models.Collective, attributes: ['slug'] }], - where: { CollectiveId: { [Op.ne]: expense.User.collective.id } }, + where: { CollectiveId: { [Op.ne]: expense.FromCollectiveId } }, }); if (similarPayoutMethods) { addBooleanCheck(checks, similarPayoutMethods.length > 0, {