1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Front/RearPort.type to slug (#3569)

This commit is contained in:
Jeremy Stretch
2019-11-25 19:39:25 -05:00
parent bcc34f6099
commit dead5b42be
7 changed files with 127 additions and 89 deletions

View File

@@ -1252,8 +1252,9 @@ class FrontPortTemplate(ComponentTemplateModel):
name = models.CharField(
max_length=64
)
type = models.PositiveSmallIntegerField(
choices=PORT_TYPE_CHOICES
type = models.CharField(
max_length=50,
choices=PortTypeChoices
)
rear_port = models.ForeignKey(
to='dcim.RearPortTemplate',
@@ -1319,8 +1320,9 @@ class RearPortTemplate(ComponentTemplateModel):
name = models.CharField(
max_length=64
)
type = models.PositiveSmallIntegerField(
choices=PORT_TYPE_CHOICES
type = models.CharField(
max_length=50,
choices=PortTypeChoices
)
positions = models.PositiveSmallIntegerField(
default=1,
@@ -2475,8 +2477,9 @@ class FrontPort(CableTermination, ComponentModel):
name = models.CharField(
max_length=64
)
type = models.PositiveSmallIntegerField(
choices=PORT_TYPE_CHOICES
type = models.CharField(
max_length=50,
choices=PortTypeChoices
)
rear_port = models.ForeignKey(
to='dcim.RearPort',
@@ -2542,8 +2545,9 @@ class RearPort(CableTermination, ComponentModel):
name = models.CharField(
max_length=64
)
type = models.PositiveSmallIntegerField(
choices=PORT_TYPE_CHOICES
type = models.CharField(
max_length=50,
choices=PortTypeChoices
)
positions = models.PositiveSmallIntegerField(
default=1,