Skip to content

Commit 8e44cfa

Browse files
ulemonsUmberto Sgueglia
authored andcommitted
fix: add logs
1 parent 15140a2 commit 8e44cfa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/libs/data-access-layer/src/members/organizations.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,14 @@ export async function mergeRoles(
706706
const existingOverrides = [...primaryAffiliationOverrides, ...secondaryAffiliationOverrides]
707707

708708
for (const removeRole of removeRoles) {
709+
logger.info(`Removing role: ${JSON.stringify(removeRole)}`)
709710
// delete affiliation overrides before removing roles to avoid foreign key conflicts
710711
const existingOverride = existingOverrides.find(
711712
(o) => o.memberOrganizationId === removeRole.id,
712713
)
713714

715+
logger.info(`Found existing override for role: ${JSON.stringify(existingOverride)}`)
716+
714717
if (existingOverride) {
715718
await deleteAffiliationOverrides(qx, removeRole.memberId, [removeRole.id])
716719
affiliationOverridesToRecreate.push({

0 commit comments

Comments
 (0)