Skip to content

Conversation

@hlbmtc
Copy link
Contributor

@hlbmtc hlbmtc commented Dec 9, 2025

Improved speed of /login endpoint by adjusting conditions sequence

user = AuthLoginBackend.find_user(login)

if user is not None and user.check_password(password) and not user.is_active:
if user and not user.is_active and user.check_password(password):
Copy link
Contributor Author

@hlbmtc hlbmtc Dec 9, 2025

Choose a reason for hiding this comment

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

@elisescu user.check_password is expensive operation, so moved it to the end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants