cht-core
cht-core copied to clipboard
fix(#8985): remove extra validation for parent place contact
Fixes #8985
@freddieptf it looks like sonar is complaining about code complexity here. would you mind the little refactor needed to keep sonar satisfied? Thanks!
@dianabarsan tests fixed
Hi @freddieptf
It looks like there is an e2e test failure that is genuine: https://github.com/medic/cht-core/actions/runs/8919300697/job/24629918331?pr=9027#step:16:1512
@dianabarsan thanks for pointing that out. I'm going to update the test to align with the new behavior. I think we shouldn't reassign the contact's parent to the place we just created, this way the only side effect is assigning the existing contact as the primary contact for the new place. What you think?
Indeed @freddieptf . We should not have a contact assignment side-effect as part of setting that contact as primary for another place.