New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"This field may not be null." when trying to update my user profile (in -prod) #9217
Comments
So to answer my own question, the serializer uses this function to show/hide the This is not exactly what we have currently in addons-frontend: addons-frontend/src/amo/reducers/users.js Lines 488 to 515 in a956af9
|
No, it's optional. (
that doesn't seem to be anything to do with |
mm, what about this then? https://github.com/mozilla/addons-server/blob/855464d3890d858edf9b9a6cf09dec14c7f8666a/src/olympia/accounts/serializers.py#L98-L102 |
Does blank allow |
yeah, it's easier to drop a serializer field if you don't want it in the response than to dynamically add one. We only want it for reviewers. |
The model allows But the serializer doesn't have |
ok so that explains why it failed for me. We likely send Should we change anything in addons-server? (like adding |
we could... though why would addons-frontend send |
In that case, there was no field at all because of a permission problem. The permission shows a field and the field will set the value to an empty string. |
So it's a problem that can't happen any more? |
I think so, yes. |
@willdurand I am not sure I understand it completely. I should see if a user with theme permissions mentioned here will not receive the red error message while updating the profile? |
A user with |
@willdurand The user I added in the Reviewers:read only group from admin tools dev which has the ReviewerTools:View permission does not have on the edit profile page a reviewer name field. Verified on dev with FF74(Win10). |
mmm, @wagnerand do you know which permissions my user in production has? |
@willdurand That would be great if we could find out the info from @wagnerand so I could do a correct check. |
@willdurand @ioanarusiczki I sent you both a DM with the details. |
@willdurand With the given permissions I could not reproduce the issue on dev. This type of user doesn't have a rev tool name field to fill in edit profile page. |
ha, well I guess I'll check in prod then |
@ioanarusiczki FWIW, my user has |
@willdurand Alright! I'm going to take a look at this again. |
I verified in prod and it worked for me :) |
For some reasons, I cannot update my user profile in production. I believe there is some sort of permission issue but I am not sure. I only see this:
and the API response contains:
Note: there is no "reviewer name" field on this page.
The text was updated successfully, but these errors were encountered: