Skip to content

Commit

Permalink
[18.01] Fix /api/whoami for master API key.
Browse files Browse the repository at this point in the history
Just yield a null JSON response instead of the internal server error that happens currently.
  • Loading branch information
jmchilton committed Mar 23, 2018
1 parent 66e624f commit 244273a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/galaxy/webapps/galaxy/api/configuration.py
Expand Up @@ -36,7 +36,10 @@ def whoami(self, trans, **kwd):
:rtype: dict
"""
current_user = self.user_manager.current_user(trans)
return current_user.to_dict()
rval = None
if current_user: # None for master API key for instance
rval = current_user.to_dict()
return rval

@expose_api_anonymous_and_sessionless
def index(self, trans, **kwd):
Expand Down

0 comments on commit 244273a

Please sign in to comment.