Updating Mentor Channels Does Not Remove Previous Values From Payload
Describe the bug Exchanging one mentor channel for another does not remove the deleted channel from the request payload.
To Reproduce Steps to reproduce the behavior:
- As a mentor, edit your profile.
- Ensure you have 3 channels
- Delete one channel
- Add a different channel
- Receive error response from API (400, too many channels)
Expected behavior I anticipated that the channels would update as expected.
Screenshots Video: https://cl.ly/492f610aff3e
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
@brentmclark I would like to fix this issue.
@arku Thanks! Do you have time to do this now? Sorry about that but it's a production bug.
Hi, The issue can also be replicated when you try registering as a mentor using the newly released form. The payload always contains 4 channels, even if you leave them blank.
channels: [{type: "linkedin", id: ""}, {type: "twitter", id: ""},…]
0: {type: "linkedin", id: ""}
1: {type: "twitter", id: ""}
2: {type: "github", id: ""}
3: {type: "slack", id: ""}
@moshfeu Ah. I have got the dev env setup but it might take me a while to get to it. Feel free to fix if you can do it right away.
Resolved by #577