"Error while updating user" when not all profile fields are filled in #100
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
KittenSquad/glewlwyd#100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the issue
When I, for example, try to update the password of the predefined admin user, I get a "Error while updating user". The network console shows that the API request returns "400 Bad request"
with this response:
["email must be a string (maximum 512 characters)"]The request contained
"email":null, probably because the email field contains no text.To Reproduce
Try to change the password of the predefined "admin" account.
Expected behavior
Update the user.
System (please complete the following information):
Debian buster, Firefox and Chrome, Glewlwyd 2.1.1 (Binary .deb packages from Github release)
Other notes
I do not have this problem when running the
babelouest/glewlwyddocker image. There the empty field results in an empty string in the API request, not anull.The
emailis alreadynullin the data sent by the server for/api/user?offset=0&limit=20. In the docker instance the server sends an empty string. So the problem seems to be server side. I use the Postgresql database backend, which is not the default, so maybe that is connected?In the database itself there are empty strings, not
nullvalues, in theg_usertable. I assume that's correct.Hello @sth ,
Thanks for the issue!
In fact, the problem lies in Hoel library, more precisely here.
The line 317 should simply say:
I'll make the change in Hoel and release a new version, then the next hoel version will be shipped in Glewlwyd 2.1.1 or 2.2.0 when it'll be released (soon but not this week).
If you need the fix soon I suggest you install Hoel 1.4.14 when it'll be available.
Nope, my bad, the fix isn't that simple because it breaks other parts of the application. I'm working on a real fix then.
@sth so now I think I have the bug fixed for real in
github.com/babelouest/hoel@a41ee55b8eI'll take a couple of more days to add new tests to avoid regression before releasing 1.4.14 though, but you can use this commit if you need the fix right away.
I'll close this issue when the new hoel version will be included in glewlwyd
Meanwhile, if you can confirm the bug is fixed, with this patch don't hesitate!
@babelouest With the new library version it works!