find-a-mentor icon indicating copy to clipboard operation
find-a-mentor copied to clipboard

Updating Mentor Channels Does Not Remove Previous Values From Payload

Open brentmclark opened this issue 7 years ago • 5 comments

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:

  1. As a mentor, edit your profile.
  2. Ensure you have 3 channels
  3. Delete one channel
  4. Add a different channel
  5. 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 avatar Aug 15 '19 19:08 brentmclark

@brentmclark I would like to fix this issue.

arku avatar Aug 15 '19 19:08 arku

@arku Thanks! Do you have time to do this now? Sorry about that but it's a production bug.

moshfeu avatar Aug 15 '19 19:08 moshfeu

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: ""}

vijaywargiya avatar Aug 15 '19 19:08 vijaywargiya

@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.

arku avatar Aug 15 '19 20:08 arku

Resolved by #577

moshfeu avatar Aug 15 '19 21:08 moshfeu