mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #7304: Require explicit values for all required choice fields during CSV import
This commit is contained in:
@@ -64,7 +64,6 @@ class ClusterCSVForm(CustomFieldModelCSVForm):
|
||||
class VirtualMachineCSVForm(CustomFieldModelCSVForm):
|
||||
status = CSVChoiceField(
|
||||
choices=VirtualMachineStatusChoices,
|
||||
required=False,
|
||||
help_text='Operational status of device'
|
||||
)
|
||||
cluster = CSVModelChoiceField(
|
||||
|
||||
@@ -194,10 +194,10 @@ class VirtualMachineTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
||||
}
|
||||
|
||||
cls.csv_data = (
|
||||
"name,cluster",
|
||||
"Virtual Machine 4,Cluster 1",
|
||||
"Virtual Machine 5,Cluster 1",
|
||||
"Virtual Machine 6,Cluster 1",
|
||||
"name,status,cluster",
|
||||
"Virtual Machine 4,active,Cluster 1",
|
||||
"Virtual Machine 5,active,Cluster 1",
|
||||
"Virtual Machine 6,active,Cluster 1",
|
||||
)
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
|
||||
Reference in New Issue
Block a user