Skip to content

Commit

Permalink
Remove redundant identity uniqueness check in member merge (#2834)
Browse files Browse the repository at this point in the history
  • Loading branch information
skwowet authored Feb 14, 2025
1 parent b5132ba commit fb90572
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions backend/src/database/repositories/memberRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -543,19 +543,14 @@ class MemberRepository {
const tenant = SequelizeRepository.getCurrentTenant(options)

for (const i of identitiesToMove) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { rowCount } = await moveToNewMember(qx, {
await moveToNewMember(qx, {
tenantId: tenant.id,
oldMemberId: fromMemberId,
newMemberId: toMemberId,
platform: i.platform,
value: i.value,
type: i.type,
})

if (rowCount !== 1) {
throw new Error('One row should be updated!')
}
}

if (identitiesToUpdate.length > 0) {
Expand Down

0 comments on commit fb90572

Please sign in to comment.