Closed Bug 1032729 Opened 10 years ago Closed 10 years ago

Update UserProfileSerializer to include username and privacy_policy_accepted fields

Categories

(Mozilla QA Graveyard :: One and Done, defect)

Version 2
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Milestone 2

People

(Reporter: bitgeeky, Assigned: bitgeeky)

Details

(Whiteboard: [qa-])

Attachments

(2 files)

Updated UserProfileSerializer and corresponding Unit tests to include the newly added username and privacy_policy_accepted fields.
Assignee: nobody → mozpankaj1994
Attached file 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-
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
Closed: 10 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 → ---
Attached file 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
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
Please add verification steps or add "qa-" to the whiteboard. Thanks
Whiteboard: [qa-]
Verifying as [qa-]
Status: RESOLVED → VERIFIED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: