Skip to content

Commit

Permalink
Use list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Dec 13, 2020
1 parent fbd5ab0 commit 5deeb59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/roles.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def index(self, trans, **kwd):
Displays a collection (list) of roles.
"""
roles = self._role_manager.list_displayable_roles(trans)
return RoleListModel(__root__=list(map(lambda r: role_to_model(trans, r), roles)))
return RoleListModel(__root__=[role_to_model(trans, r) for r in roles])

@web.expose_api
def show(self, trans, id, **kwd):
Expand Down

0 comments on commit 5deeb59

Please sign in to comment.