Skip to content

Commit

Permalink
roles: changed need creation by role name to id
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo committed Jul 27, 2023
1 parent d05b3e5 commit 22325a2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions invenio_users_resources/entity_resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ def _resolve(self):
# Resolves to role name, not id
role_id = self._parse_ref_dict_id()
try:
return Role.query.filter(
Role.name == role_id # TODO to be changed to role id
).one()
return Role.query.filter(Role.id == role_id).one()
except NoResultFound:
return {}

Expand Down

0 comments on commit 22325a2

Please sign in to comment.