fix pycodestyle

This commit is contained in:
jonaswinkler 2021-02-26 13:09:02 +01:00
parent adfe5c123c
commit 1c0069e95e

View File

@ -13,6 +13,8 @@ class ApiVersionMiddleware:
if request.user.is_authenticated: if request.user.is_authenticated:
versions = settings.REST_FRAMEWORK['ALLOWED_VERSIONS'] versions = settings.REST_FRAMEWORK['ALLOWED_VERSIONS']
response['X-Api-Version'] = versions[len(versions)-1] response['X-Api-Version'] = versions[len(versions)-1]
response['X-Version'] = ".".join([str(_) for _ in version.__version__]) response['X-Version'] = ".".join(
[str(_) for _ in version.__version__]
)
return response return response