From dff8c05bc05b75a0bc3773ddf0671b0c965c1e1a Mon Sep 17 00:00:00 2001 From: Martin Hauser Date: Mon, 2 Feb 2026 20:13:17 +0100 Subject: [PATCH] feat(ipam): Add parent object fields for Services Include `parent_object_type` and `parent_object_id` in `clone_fields` for services. This improves cloning behavior for models using parent object references, ensuring more accurate data duplication. Fixes #21168 --- netbox/ipam/models/services.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netbox/ipam/models/services.py b/netbox/ipam/models/services.py index c2c9ca444..74504c5dc 100644 --- a/netbox/ipam/models/services.py +++ b/netbox/ipam/models/services.py @@ -87,7 +87,9 @@ class Service(ContactsMixin, ServiceBase, PrimaryModel): help_text=_("The specific IP addresses (if any) to which this application service is bound") ) - clone_fields = ['protocol', 'ports', 'description', 'parent', 'ipaddresses', ] + clone_fields = ( + 'protocol', 'ports', 'description', 'parent_object_type', 'parent_object_id', 'ipaddresses', + ) class Meta: indexes = (