1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

8749 clone custom fields

This commit is contained in:
Arthur
2022-11-17 10:25:50 -08:00
committed by Jeremy Stretch
parent ef7c66de34
commit f7150645a1
9 changed files with 45 additions and 5 deletions

View File

@ -163,13 +163,18 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
verbose_name='UI visibility',
help_text=_('Specifies the visibility of custom field in the UI')
)
is_cloneable = models.BooleanField(
default=False,
verbose_name='Cloneable',
help_text='If true, this field will be copied over when cloning objects.'
)
objects = CustomFieldManager()
clone_fields = (
'content_types', 'type', 'object_type', 'group_name', 'description', 'required', 'search_weight',
'filter_logic', 'default', 'weight', 'validation_minimum', 'validation_maximum', 'validation_regex', 'choices',
'ui_visibility',
'ui_visibility', 'is_cloneable',
)
class Meta: