diff --git a/jupyter_server/base/handlers.py b/jupyter_server/base/handlers.py index c28807b8e2..1f5c4f5294 100644 --- a/jupyter_server/base/handlers.py +++ b/jupyter_server/base/handlers.py @@ -771,7 +771,7 @@ def update_api_activity(self): # record activity of authenticated requests if ( self._track_activity - and getattr(self, "_user_cache", None) + and getattr(self, "_jupyter_current_user", None) and self.get_argument("no_track_activity", None) is None ): self.settings["api_last_activity"] = utcnow()