mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #9548 from mvdbeek/minor_ts_fix
[20.01] Prevent exception in toolshed if userid is 'current'
This commit is contained in:
@@ -106,11 +106,7 @@ class UsersController(BaseAPIController):
|
||||
"""
|
||||
user = None
|
||||
# user is requesting data about themselves
|
||||
if id == "current" and trans.user:
|
||||
user = trans.user
|
||||
else:
|
||||
user = suc.get_user(trans.app, id)
|
||||
|
||||
user = trans.user if id == 'current' else suc.get_user(trans.app, id)
|
||||
if user is None:
|
||||
user_dict = dict(message='Unable to locate user record for id %s.' % (str(id)),
|
||||
status='error')
|
||||
|
||||
Reference in New Issue
Block a user