Browse Source

Fixes #11205: Correct cloning behavior for recursively-nested models

jeremystretch 3 years ago
parent
commit
951f82b428
2 changed files with 2 additions and 1 deletions
  1. 1 0
      docs/release-notes/version-3.4.md
  2. 1 1
      netbox/netbox/models/__init__.py

+ 1 - 0
docs/release-notes/version-3.4.md

@@ -5,6 +5,7 @@
 ### Bug Fixes
 
 * [#11185](https://github.com/netbox-community/netbox/issues/11185) - Fix TemplateSyntaxError when viewing custom script results
+* [#11205](https://github.com/netbox-community/netbox/issues/11205) - Correct cloning behavior for recursively-nested models
 
 ---
 

+ 1 - 1
netbox/netbox/models/__init__.py

@@ -75,7 +75,7 @@ class PrimaryModel(NetBoxModel):
         abstract = True
 
 
-class NestedGroupModel(NetBoxFeatureSet, MPTTModel):
+class NestedGroupModel(CloningMixin, NetBoxFeatureSet, MPTTModel):
     """
     Base model for objects which are used to form a hierarchy (regions, locations, etc.). These models nest
     recursively using MPTT. Within each parent, each child instance must have a unique name.