mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Enable CSV import for custom fields
This commit is contained in:
@@ -94,7 +94,7 @@ class CustomFieldModelCSVForm(CustomFieldModelForm):
|
||||
# Append form fields
|
||||
for cf in CustomField.objects.filter(obj_type=self.obj_type):
|
||||
field_name = 'cf_{}'.format(cf.name)
|
||||
self.fields[field_name] = cf.to_form_field()
|
||||
self.fields[field_name] = cf.to_form_field(for_csv_import=True)
|
||||
|
||||
# Annotate the field in the list of CustomField form fields
|
||||
self.custom_fields.append(field_name)
|
||||
|
||||
Reference in New Issue
Block a user