Skip to content

Commit e59ee3e

Browse files
committed
Fixes #14397: Pass a mutable copy of request data when provisioning available IPs
1 parent 92bdaa2 commit e59ee3e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

netbox/ipam/api/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from copy import deepcopy
2+
13
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
24
from django.db import transaction
35
from django.shortcuts import get_object_or_404
@@ -290,7 +292,7 @@ def post(self, request, pk):
290292
)
291293

292294
# Prepare object data for deserialization
293-
requested_objects = self.prep_object_data(requested_objects, available_objects, parent)
295+
requested_objects = self.prep_object_data(deepcopy(requested_objects), available_objects, parent)
294296

295297
# Initialize the serializer with a list or a single object depending on what was requested
296298
serializer_class = get_serializer_for_model(self.queryset.model)

0 commit comments

Comments
 (0)