X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/10dc1a5e84d23582a58ead2551ddf54a66b94496..8861d28c171c5d759253c6b9ab48b7b10c40858c:/src/api/utils.py?ds=sidebyside diff --git a/src/api/utils.py b/src/api/utils.py index c9c1f94cc..a3a1f893a 100644 --- a/src/api/utils.py +++ b/src/api/utils.py @@ -25,8 +25,9 @@ def oauthlib_request(request): "headers": headers, } -def oauthlib_response((headers, body, status)): +def oauthlib_response(response_tuple): """Creates a django.http.HttpResponse from (headers, body, status) tuple from OAuthlib.""" + headers, body, status = response_tuple response = HttpResponse(body, status=status) for k, v in headers.items(): if k == 'Location':