ModelBackend.authenticate() shouldn't make a database query when username is None Description
ModelBackend.authenticate() shouldn't make a database query when username is None Description: a task in Lego-RL-SWE-Bench-Verified (Harbor dataset). It's easier to explain my issue by adding a comment in the current implementation of ModelBackend.authenticate(): def authenticate(self, request…
The task
It's easier to explain my issue by adding a comment in the current implementation of ModelBackend.authenticate(): def authenticate(self, request, username=None, password=None, **kwargs): if username is None: username = kwargs.get(UserModel.USERNAME_FIELD) # At this point, username and password can be None, #…
Part of Lego-X/Lego-RL-SWE-Bench-Verified.