mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Fixes #14397: Pass a mutable copy of request data when provisioning available IPs
This commit is contained in:
parent
92bdaa2120
commit
e59ee3e01e
@ -1,3 +1,5 @@
|
|||||||
|
from copy import deepcopy
|
||||||
|
|
||||||
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
|
||||||
from django.db import transaction
|
from django.db import transaction
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
@ -290,7 +292,7 @@ class AvailableObjectsView(ObjectValidationMixin, APIView):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Prepare object data for deserialization
|
# Prepare object data for deserialization
|
||||||
requested_objects = self.prep_object_data(requested_objects, available_objects, parent)
|
requested_objects = self.prep_object_data(deepcopy(requested_objects), available_objects, parent)
|
||||||
|
|
||||||
# Initialize the serializer with a list or a single object depending on what was requested
|
# Initialize the serializer with a list or a single object depending on what was requested
|
||||||
serializer_class = get_serializer_for_model(self.queryset.model)
|
serializer_class = get_serializer_for_model(self.queryset.model)
|
||||||
|
Loading…
Reference in New Issue
Block a user