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 Aug 9, 2023
1 parent 112423b commit 5b5aade
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 5b5aade

Please sign in to comment.