17170 fixes

This commit is contained in:
Arthur 2025-03-12 15:43:03 -07:00
parent a843765d0c
commit 1b2c96bc7b
2 changed files with 5 additions and 12 deletions

View File

@ -77,17 +77,10 @@ class ContactRoleImportForm(NetBoxModelImportForm):
class ContactImportForm(NetBoxModelImportForm):
group = CSVModelChoiceField(
label=_('Group'),
queryset=ContactGroup.objects.all(),
required=False,
to_field_name='name',
help_text=_('Assigned group')
)
class Meta:
model = Contact
fields = ('name', 'title', 'phone', 'email', 'address', 'link', 'group', 'description', 'comments', 'tags')
fields = ('name', 'title', 'phone', 'email', 'address', 'link', 'description', 'comments', 'tags')
class ContactAssignmentImportForm(NetBoxModelImportForm):

View File

@ -214,10 +214,10 @@ class ContactTestCase(ViewTestCases.PrimaryObjectViewTestCase):
}
cls.csv_data = (
"groups,name",
"Contact Group 1,Contact 4",
"Contact Group 1,Contact 5",
"Contact Group 1,Contact 6",
"name",
"Contact 4",
"Contact 5",
"Contact 6",
)
cls.csv_update_data = (