diff --git a/lib/galaxy/webapps/galaxy/services/users.py b/lib/galaxy/webapps/galaxy/services/users.py index 91bcf390c0a7..fa820748c11c 100644 --- a/lib/galaxy/webapps/galaxy/services/users.py +++ b/lib/galaxy/webapps/galaxy/services/users.py @@ -122,10 +122,9 @@ def get_user(self, trans: ProvidesUserContext, user_id): def _anon_user_api_value(self, trans: ProvidesHistoryContext): """Return data for an anonymous user, truncated to only usage and quota_percent""" if not trans.user and not trans.history: - # Can't return info about this user, may not have a history yet. - # return {} - raise glx_exceptions.MessageException(err_msg="The user has no history, which should always be the case.") - usage = self.quota_agent.get_usage(trans, history=trans.history) + usage = None + else: + usage = self.quota_agent.get_usage(trans, history=trans.history) percent = self.quota_agent.get_percent(trans=trans, usage=usage) usage = usage or 0 return {