Skip to content

Fix `email` column being NULL for new users after 202d88ab

Yuto Takano requested to merge yutotakano/fix-empty-email-column into master

Commit 202d88ab fixed a bug where a user wouldn't be found since the email entry in the database didn't match the JWT claim. Unfortunately the fix was not correctly done. Using .get_or_create() with just the UUN filter will correctly find the user if it exists, but won't fill the email column when creating a new user. This MR fixes it by using the defaults argument which sets values for creation.

Merge request reports