Skip to content

Commit 1c9d39d

Browse files
committed
Fix REST API version reporting for beta releases
1 parent f16c6d8 commit 1c9d39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/netbox/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def _setting(name, default=None):
459459
# Django REST framework (API)
460460
#
461461

462-
REST_FRAMEWORK_VERSION = VERSION.rsplit('.', 1)[0] # Use major.minor as API version
462+
REST_FRAMEWORK_VERSION = '.'.join(VERSION.split('-')[0].split('.')[:2]) # Use major.minor as API version
463463
REST_FRAMEWORK = {
464464
'ALLOWED_VERSIONS': [REST_FRAMEWORK_VERSION],
465465
'COERCE_DECIMAL_TO_STRING': False,

0 commit comments

Comments
 (0)