File tree 2 files changed +9
-0
lines changed
src/netbox_initializers/initializers
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ def load_data(self):
55
55
if cf_details .get ("ui_visibility" , False ):
56
56
custom_field .ui_visibility = cf_details ["ui_visibility" ]
57
57
58
+ if cf_details .get ("search_weight" , - 1 ) >= 0 :
59
+ custom_field .search_weight = cf_details ["search_weight" ]
60
+
61
+ if cf_details .get ("is_cloneable" , None ) is not None :
62
+ custom_field .is_cloneable = cf_details ["is_cloneable" ]
63
+
58
64
# object_type should only be applied when type is object, multiobject
59
65
if cf_details .get ("object_type" ):
60
66
if cf_details .get ("type" ) not in (
Original file line number Diff line number Diff line change 28
28
# weight: 0
29
29
# group_name: group1
30
30
# ui_visibility: read-only
31
+ # search_weight: 100
31
32
# on_objects:
32
33
# - dcim.models.Device
33
34
# - dcim.models.Rack
47
48
# validation_maximum: 255
48
49
# weight: 10
49
50
# group_name: group1
51
+ # is_cloneable: false
50
52
# on_objects:
51
53
# - tenancy.models.Tenant
52
54
# select_field:
56
58
# filter_logic: exact
57
59
# weight: 30
58
60
# default: First Item
61
+ # is_cloneable: true
59
62
# on_objects:
60
63
# - dcim.models.Device
61
64
# choices:
You can’t perform that action at this time.
0 commit comments