Kaynağa Gözat

Closes #10036: Set clone_fields on L2VPNTermination

jeremystretch 3 yıl önce
ebeveyn
işleme
5671a37f43
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      netbox/ipam/models/l2vpn.py

+ 7 - 0
netbox/ipam/models/l2vpn.py

@@ -8,6 +8,11 @@ from ipam.choices import L2VPNTypeChoices
 from ipam.constants import L2VPN_ASSIGNMENT_MODELS
 from ipam.constants import L2VPN_ASSIGNMENT_MODELS
 from netbox.models import NetBoxModel
 from netbox.models import NetBoxModel
 
 
+__all__ = (
+    'L2VPN',
+    'L2VPNTermination',
+)
+
 
 
 class L2VPN(NetBoxModel):
 class L2VPN(NetBoxModel):
     name = models.CharField(
     name = models.CharField(
@@ -79,6 +84,8 @@ class L2VPNTermination(NetBoxModel):
         fk_field='assigned_object_id'
         fk_field='assigned_object_id'
     )
     )
 
 
+    clone_fields = ('l2vpn',)
+
     class Meta:
     class Meta:
         ordering = ('l2vpn',)
         ordering = ('l2vpn',)
         verbose_name = 'L2VPN termination'
         verbose_name = 'L2VPN termination'