Fix issue with importing dcim.constants IFACE_TYPE_CHOICES in Netbox 2.5
This commit is contained in:
parent
b69a38015c
commit
efea1bac7b
1 changed files with 6 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
|||
from dcim.models import Interface, Device
|
||||
from dcim.constants import IFACE_TYPE_CHOICES
|
||||
|
||||
try:
|
||||
from dcim.constants import IFACE_TYPE_CHOICES
|
||||
except ImportError:
|
||||
from dcim.constants import IFACE_FF_CHOICES as IFACE_TYPE_CHOICES
|
||||
|
||||
from extras.models import CustomField, CustomFieldValue
|
||||
from ruamel.yaml import YAML
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue