Remove redundant profile check in docs example

This commit is contained in:
Aleksi Häkli 2019-11-13 21:49:35 +02:00
parent 5f56335dcb
commit 8e972f5d6e
No known key found for this signature in database
GPG key ID: 3E7146964D726BBE

View file

@ -235,7 +235,7 @@ validator classes to function correctly.
request.POST = body
user = authenticate(request=request, username=username, password=password)
if user is not None and user.is_active and hasattr(user, 'profile'):
if user is not None and user.is_active:
request = _request
request.user = user
return True