Do not create duplicate memberships when merging accounts #4648
Labels
api
Issues that require some work on the API (https://github.com/opencollective/opencollective-api)
complexity → simple
enhancement
Milestone
Not a big issue and easy to fix manually, but the
mergeAccounts
(root-only) feature can end up creating duplicate memberships. If you merge two users, and they're both an admin of a collective, you will end up with two ADMIN memberships to the same collective.Expected behavior
When moving members, if an entry already exists for this
CollectiveId
/MemberId
/role
/TierId
, (soft) delete the membership rather than moving it.The text was updated successfully, but these errors were encountered: