Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions gotrue/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
def determine_session_or_user_model_from_response(
response: Response,
) -> Union[Type[Session], Type[User]]:
if "access_token" in response.json():
return Session
return User
return Session if "access_token" in response.json() else User
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function determine_session_or_user_model_from_response refactored with the following changes:



class BaseModelFromResponse(BaseModel):
Expand Down