Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 31, 2025
1 parent d271ef9 commit 61240d1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions oauth2_provider/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django import http
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.views import redirect_to_login
from django.http import HttpResponse, JsonResponse
from django.http import HttpResponse
from django.shortcuts import resolve_url
from django.utils import timezone
from django.utils.decorators import method_decorator
Expand Down Expand Up @@ -325,17 +325,15 @@ def device_flow_token_response(
if device.status == device.AUTHORIZATION_PENDING:
pending_error = AuthorizationPendingError()
return http.HttpResponse(
content=pending_error.json,
status=pending_error.status_code,
content_type="application/json"
content=pending_error.json, status=pending_error.status_code, content_type="application/json"
)

if device.status == device.DENIED:
access_denied_error = AccessDenied()
return http.HttpResponse(
content=access_denied_error.json,
status=access_denied_error.status_code,
content_type="application/json"
content_type="application/json",
)

url, headers, body, status = self.create_token_response(request)
Expand Down

0 comments on commit 61240d1

Please sign in to comment.