Skip to content

Commit

Permalink
Fixes #14397: Pass a mutable copy of request data when provisioning a…
Browse files Browse the repository at this point in the history
…vailable IPs
  • Loading branch information
jeremystretch committed Dec 5, 2023
1 parent 9d09916 commit 81e8551
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion netbox/ipam/api/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from copy import deepcopy

from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.db import transaction
from django.shortcuts import get_object_or_404
Expand Down Expand Up @@ -290,7 +292,7 @@ def post(self, request, pk):
)

# 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
serializer_class = get_serializer_for_model(self.queryset.model)
Expand Down

0 comments on commit 81e8551

Please sign in to comment.