Update UserProfileSerializer to include username and privacy_policy_accepted fields

VERIFIED FIXED in Milestone 2

Status

Mozilla QA
One and Done
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: bitgeeky, Assigned: bitgeeky)

Tracking

Version 2
Milestone 2
x86_64
Linux

Details

(Whiteboard: [qa-])

Attachments

(2 attachments)

(Assignee)

Description

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

Updated

3 years ago
Assignee: nobody → mozpankaj1994
(Assignee)

Comment 1

3 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

3 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)
Comment on attachment 8448586 [details] [review]
Link to pull request.

Landed in https://github.com/mozilla/oneanddone/commit/f21d24eccfb7d6c3309580c051fc23bc12a2b3d9
Attachment #8448586 - Flags: review?(bob.silverberg) → review+
Status: NEW → RESOLVED
Last Resolved: 3 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

3 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)
Comment on attachment 8449591 [details] [review]
Link to pull request.

Landed in https://github.com/mozilla/oneanddone/commit/749805df85bba22881e1ffb00be59ee8ff531ec9
Attachment #8449591 - Flags: review?(bob.silverberg) → review+
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: 3 years ago3 years ago
Resolution: --- → FIXED
Please add verification steps or add "qa-" to the whiteboard. Thanks
Whiteboard: [qa-]
Verifying as [qa-]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.