Fixes #15771: Show id field as supported on all bulk import forms
This commit is contained in:
parent
ebe504c825
commit
e87877b6ea
|
@ -73,11 +73,6 @@ class NetBoxModelImportForm(CSVModelForm, NetBoxModelForm):
|
|||
"""
|
||||
Base form for creating a NetBox objects from CSV data. Used for bulk importing.
|
||||
"""
|
||||
id = forms.IntegerField(
|
||||
label=_('Id'),
|
||||
required=False,
|
||||
help_text='Numeric ID of an existing object to update (if not creating a new object)'
|
||||
)
|
||||
tags = CSVModelMultipleChoiceField(
|
||||
label=_('Tags'),
|
||||
queryset=Tag.objects.all(),
|
||||
|
|
|
@ -70,6 +70,12 @@ class CSVModelForm(forms.ModelForm):
|
|||
"""
|
||||
ModelForm used for the import of objects in CSV format.
|
||||
"""
|
||||
id = forms.IntegerField(
|
||||
label=_('ID'),
|
||||
required=False,
|
||||
help_text=_('Numeric ID of an existing object to update (if not creating a new object)')
|
||||
)
|
||||
|
||||
def __init__(self, *args, headers=None, **kwargs):
|
||||
self.headers = headers or {}
|
||||
super().__init__(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue