bridge-in-tech-backend icon indicating copy to clipboard operation
bridge-in-tech-backend copied to clipboard

Bug: Update user personal details is not working if the same username is used | CROSS PROJECT ISSUE

Open rpattath opened this issue 5 years ago • 8 comments

Describe the bug Edit the personal information of the logged in user is not working.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'My Space -> Profile -> Personal Details"
  2. Change any field.
  3. Save the changes
  4. See error INFO:werkzeug:127.0.0.1 - - [18/Sep/2020 11:07:36] "OPTIONS /user/personal_details HTTP/1.1" 200 - CRITICAL:root:{'message': 'A user with that username already exists.'} 127.0.0.1 - - [18/Sep/2020 11:07:36] "PUT /user/personal_details HTTP/1.1" 400 - INFO:werkzeug:127.0.0.1 - - [18/Sep/2020 11:07:36] "PUT /user/personal_details HTTP/1.1" 400 -

Expected behavior Personal detail update should be successful

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Fedora linux
  • Browser: Chrome

rpattath avatar Sep 18 '20 15:09 rpattath

@rpattath , thank you for opening this 🎉. I had this at the back of my mind, just didn't get a chance to do it 😊. This is a cross-project issue as the MS requires user to also change their username if they want to update details. This issue also been raised on MS which I mentioned on the PR #74 for this endpoint.

mtreacy002 avatar Sep 20 '20 23:09 mtreacy002

I've changed the title a bit to make it clear why it is not working.

mtreacy002 avatar Sep 20 '20 23:09 mtreacy002

I am not sure but I guess this is the issue because of which some of the fields in the profile always shows up as empty even after updating them in mentorship-android app🤔

HeroicHitesh avatar Sep 21 '20 07:09 HeroicHitesh

@HeroicHitesh , you can try to change the username. It'll be accepted even if there are empty non-required fields in them. Which means, the issue is because of the existing logic required username to be changed on any update, which is not a common logic, so we need to change it at MS backend.

mtreacy002 avatar Sep 22 '20 23:09 mtreacy002

I am not sure but I guess this is the issue because of which some of the fields in the profile always shows up as empty even after updating them in mentorship-android app🤔

For fields still showing as empty even after updating on MS Android, have you tried to refresh the page? If it still didn't change after refreshing the page, then you probably should check if there's a bug report on this already made. If nonee, then you can open one.

mtreacy002 avatar Sep 22 '20 23:09 mtreacy002

Hi,

I would like to work on this one.

ashokrayal avatar Sep 26 '20 01:09 ashokrayal

@Ashokrayal. This PR is tightly-coupled with issue 596 of MS backend. MS backend PR 855 to fix this issue is currently under review. Please keep an eye on that PR 855, since only once that PR is approved and merged to MS backend develop branch, we can make relevant modification onto BIT (BridgeInTech). So, please comeback to claim this issue once that PR is finalized. 😉

mtreacy002 avatar Sep 26 '20 03:09 mtreacy002

Ok. Thanks, @mtreacy002

ashokrayal avatar Sep 26 '20 04:09 ashokrayal