mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#6732 - Fix CSV import form
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
from django import forms
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.forms import IntegerField
|
||||
|
||||
from dcim.models import Device, Interface, Site
|
||||
from extras.forms import CustomFieldModelCSVForm
|
||||
@ -83,17 +84,12 @@ class AggregateCSVForm(CustomFieldModelCSVForm):
|
||||
|
||||
|
||||
class ASNCSVForm(CustomFieldModelCSVForm):
|
||||
slug = SlugField()
|
||||
asn = IntegerField()
|
||||
rir = CSVModelChoiceField(
|
||||
queryset=RIR.objects.all(),
|
||||
to_field_name='name',
|
||||
help_text='Assigned RIR'
|
||||
)
|
||||
sites = CSVModelChoiceField(
|
||||
queryset=Site.objects.all(),
|
||||
to_field_name='name',
|
||||
help_text='Assigned site'
|
||||
)
|
||||
tenant = CSVModelChoiceField(
|
||||
queryset=Tenant.objects.all(),
|
||||
required=False,
|
||||
|
Reference in New Issue
Block a user