mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-22 19:48:45 -06:00
Closes #17143: Deprecate the use of dedicated nested API serializers
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import warnings
|
||||
|
||||
from rest_framework import serializers
|
||||
|
||||
from extras import models
|
||||
@@ -20,6 +22,12 @@ __all__ = [
|
||||
'NestedWebhookSerializer',
|
||||
]
|
||||
|
||||
# TODO: Remove in v4.2
|
||||
warnings.warn(
|
||||
f"Dedicated nested serializers will be removed in NetBox v4.2. Use Serializer(nested=True) instead.",
|
||||
DeprecationWarning
|
||||
)
|
||||
|
||||
|
||||
class NestedEventRuleSerializer(WritableNestedSerializer):
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ from .serializers_.configtemplates import *
|
||||
from .serializers_.savedfilters import *
|
||||
from .serializers_.scripts import *
|
||||
from .serializers_.tags import *
|
||||
from .nested_serializers import *
|
||||
|
||||
Reference in New Issue
Block a user