fix(users): Commit user profile data to DB#403
Merged
sakshamarora1 merged 1 commit intoCERNDocumentServer:masterfrom Apr 13, 2026
Merged
fix(users): Commit user profile data to DB#403sakshamarora1 merged 1 commit intoCERNDocumentServer:masterfrom
sakshamarora1 merged 1 commit intoCERNDocumentServer:masterfrom
Conversation
9a4a48b to
a6880ff
Compare
kpsherva
reviewed
Apr 13, 2026
| # Validate username, if not valid, generate a new prefixed username from email | ||
| if not re.fullmatch( | ||
| current_app.config["ACCOUNTS_USERNAME_REGEX"], username | ||
| ): |
Contributor
There was a problem hiding this comment.
how does it fix the MIGRATED prefix? The goal was not to have it displayed in the visible spots.
part of why it was handled like this is that these accounts are also having duplicated usernames, we should detect when this happens and do some mitigations
Contributor
Author
There was a problem hiding this comment.
the migrated prefix is fixed by having the full_name being populated in the api.py file
a6880ff to
65e36d3
Compare
sakshamarora1
commented
Apr 13, 2026
| remote_account = self.create_invenio_remote_account(user_id, extra_data) | ||
| db.session.add(remote_account) | ||
|
|
||
| db.session.commit() |
Contributor
Author
There was a problem hiding this comment.
This will fix the migrated in the username, since the frontend checks first for the "full_name" in the user_profile and if not found, defaults to the username
65e36d3 to
a6880ff
Compare
kpsherva
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes: #402