medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

CHP Areas without a primary contact cannot be replaced #173

Closed kennsippell closed 1 month ago

kennsippell commented 1 month ago
TypeError: Cannot read properties of undefined (reading '_id')
    at ChtApi.<anonymous> (/home/kenn/cht-user-management/dist/lib/cht-api.js:60:56)
    at Generator.next (<anonymous>)
    at fulfilled (/home/kenn/cht-user-management/dist/lib/cht-api.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {stack: 'TypeError: Cannot read properties of undefine…ions (node:internal/process/task_queues:96:5)', message: 'Cannot read properties of undefined (reading '_id')'}
message: 'Cannot read properties of undefined (reading '_id')'
stack: 'TypeError: Cannot read properties of undefined (reading '_id')\n    at ChtApi.<anonymous> (/home/kenn/cht-user-management/dist/lib/cht-api.js:60:56)\n    at Generator.next (<anonymous>)\n    at fulfilled (/home/kenn/cht-user-management/dist/lib/cht-api.js:5:58)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)'

Happening for replacement https://migori-echis.health.go.ke/#/contacts/cb34899e-eee2-593b-a7c0-d6f8e2c4db03

kennsippell commented 1 month ago

The problem is that the CHP Area does not have a primary contact.