Remove unsupported tags field added by NetBoxModelImportForm

This commit is contained in:
Jeremy Stretch 2023-07-28 09:10:42 -04:00
parent cef913c383
commit ced032bab1

View File

@ -90,19 +90,20 @@ class ContactAssignmentImportForm(NetBoxModelImportForm):
queryset=ContentType.objects.all(),
help_text=_("One or more assigned object types")
)
contact = CSVModelChoiceField(
queryset=Contact.objects.all(),
to_field_name='name',
help_text=_('Assigned contact')
)
role = CSVModelChoiceField(
queryset=ContactRole.objects.all(),
to_field_name='name',
help_text=_('Assigned role')
)
# Remove the tags field added by NetBoxModelImportForm (unsupported by ContactAssignment)
tags = None
class Meta:
model = ContactAssignment
fields = ('content_type', 'object_id', 'contact', 'priority', 'role')