Update UserProfileSerializer to include username and privacy_policy_accepted fields

VERIFIED FIXED in Milestone 2

Status

VERIFIED FIXED
5 years ago
4 months ago

People

(Reporter: bitgeeky, Assigned: bitgeeky)

Tracking

Version 2
Milestone 2
x86_64
Linux

Details

(Whiteboard: [qa-])

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
Updated UserProfileSerializer and corresponding Unit tests to include the newly added username and privacy_policy_accepted fields.
(Assignee)

Updated

5 years ago
Assignee: nobody → mozpankaj1994
(Assignee)

Comment 1

5 years ago
Created attachment 8448586 [details] [review]
Link to pull request.
Attachment #8448586 - Flags: review?(bob.silverberg)
Comment on attachment 8448586 [details] [review]
Link to pull request.

Good work, bitgeeky. Just a few nits to address and it should be good to go.
Attachment #8448586 - Flags: review?(bob.silverberg) → review-
(Assignee)

Comment 3

5 years ago
Comment on attachment 8448586 [details] [review]
Link to pull request.

Made the suggested changes. Please review.
Attachment #8448586 - Flags: review- → review?(bob.silverberg)
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Milestone 2
Oops, there is a problem here in that the User.username needs to be set too, not just Profile.username, as we need to ensure that User.username is unique too. I'm not going to back out the commit, so please make the change based on the latest version of master and submit a new pull request that fixes this. Also please add a test for this, which verifies that we can create two users in a row, and which does not result in a unique constraint error. Please write that test first so that when you run it you see it fail - that way you'll know you wrote the test correctly. Then fix the code to fix the error, after which the test should pass.
Status: RESOLVED → REOPENED
Flags: needinfo?(mozpankaj1994)
Resolution: FIXED → ---
(Assignee)

Comment 6

5 years ago
Created attachment 8449591 [details] [review]
Link to pull request.

https://github.com/mozilla/oneanddone/pull/148

Thanks for pointing this out Bob. It would have created lot of problem later.
I have added User.username field to the User Serializer which would fix this issue.
Attachment #8449591 - Flags: review?(bob.silverberg)
Flags: needinfo?(mozpankaj1994)
Thanks bitgeeky. One thing to remember though, please use the bug number and description for the first line of your commit message in the future.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Please add verification steps or add "qa-" to the whiteboard. Thanks
Whiteboard: [qa-]
Verifying as [qa-]
Status: RESOLVED → VERIFIED

Updated

4 months ago
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.