*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 60751e80 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

Fix fetching user by username

* the "profile" is actually a user object already...
* seems like a leftover from older versions user models
parent cdd8e827
No related branches found
No related tags found
1 merge request!43Fix fetching user by username
......@@ -20,12 +20,7 @@ from invenio_accounts.models import User
def get_user_by_username(username):
"""Get the user identified by the username."""
profile = User.query.filter(User.username == username).one_or_none()
if profile is not None:
return profile.user
return None
return User.query.filter(User.username == username).one_or_none()
def get_user(identifier):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment