mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-09 09:31:49 -05:00
prefix all /api/v1/ view descriptions with a deprecation message
additionally, fix a bug in /api/v1/credentials/ view descriptions that causes v2 fields to display (see: #6116)
This commit is contained in:
@@ -14,6 +14,9 @@ def get_request_version(request):
|
||||
version = settings.REST_FRAMEWORK['DEFAULT_VERSION']
|
||||
if request and hasattr(request, 'version'):
|
||||
version = request.version
|
||||
if version is None:
|
||||
# For requests to /api/
|
||||
return None
|
||||
return int(version.lstrip('v'))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user