Fix DRF deprecation warnings (#23082)
Fix all deprecation warnings generated by Django REST Framework during the unit tests: * ``The `base_name` argument is pending deprecation in favor of `basename`.`` (86 occurrences) * `` `detail_route` is deprecated and will be removed in 3.10 in favor of `action`, which accepts a `detail` bool. Use `@action(detail=True)` instead.`` (18 occurrences)
This commit is contained in:
@@ -6,7 +6,7 @@ from rest_framework.routers import DefaultRouter
|
||||
from .views import EntitlementEnrollmentViewSet, EntitlementViewSet
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register(r'entitlements', EntitlementViewSet, base_name='entitlements')
|
||||
router.register(r'entitlements', EntitlementViewSet, basename='entitlements')
|
||||
|
||||
ENROLLMENTS_VIEW = EntitlementEnrollmentViewSet.as_view({
|
||||
'post': 'create',
|
||||
|
||||
Reference in New Issue
Block a user