Skip to content

Commit

Permalink
fix: Correct recursion error on load in JupyterHub (jupyterlab#178)
Browse files Browse the repository at this point in the history
* fix: Correct recursion error on load in JupyterHub

* fix: Renamed get_current_user to get_chat_user
  • Loading branch information
mschroering authored May 22, 2023
1 parent 88df4c3 commit 9c777b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def get(self, *args, **kwargs):
res = super().get(*args, **kwargs)
await res

def get_current_user(self) -> ChatUser:
def get_chat_user(self) -> ChatUser:
"""Retrieves the current user. If collaborative mode is disabled, one
is synthesized from the login."""
collaborative = self.config.get("LabApp", {}).get("collaborative", False)
Expand Down Expand Up @@ -189,7 +189,7 @@ def open(self):
"""Handles opening of a WebSocket connection. Client ID can be retrieved
from `self.client_id`."""

current_user = self.get_current_user().dict()
current_user = self.get_chat_user().dict()
client_id = self.generate_client_id()

self.chat_handlers[client_id] = self
Expand Down

0 comments on commit 9c777b3

Please sign in to comment.