1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix REST API version calculation

This commit is contained in:
Jeremy Stretch
2020-07-09 13:08:13 -04:00
parent 1692fbf5d8
commit 26e81546eb

View File

@ -455,7 +455,7 @@ FILTERS_NULL_CHOICE_VALUE = 'null'
# Django REST framework (API)
#
REST_FRAMEWORK_VERSION = VERSION[0:3] # Use major.minor as API version
REST_FRAMEWORK_VERSION = VERSION.rsplit('.', 1)[0] # Use major.minor as API version
REST_FRAMEWORK = {
'ALLOWED_VERSIONS': [REST_FRAMEWORK_VERSION],
'DEFAULT_AUTHENTICATION_CLASSES': (