diff --git a/lib/galaxy/webapps/base/webapp.py b/lib/galaxy/webapps/base/webapp.py index a67d34fe8cf1..a173b03b7583 100644 --- a/lib/galaxy/webapps/base/webapp.py +++ b/lib/galaxy/webapps/base/webapp.py @@ -368,7 +368,7 @@ def get_user(self): def set_user(self, user): """Set the current user.""" if self.galaxy_session: - if user.bootstrap_admin_user: + if user and not user.bootstrap_admin_user: self.galaxy_session.user = user self.sa_session.add(self.galaxy_session) self.sa_session.flush()