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

Clean up redundant NestedGroupModel, OrganizationalModel fields

This commit is contained in:
jeremystretch
2022-11-03 13:59:44 -04:00
parent 6b2deaeced
commit e2f5ee661a
18 changed files with 19 additions and 313 deletions

View File

@ -38,27 +38,9 @@ class RackRole(OrganizationalModel):
"""
Racks can be organized by functional role, similar to Devices.
"""
name = models.CharField(
max_length=100,
unique=True
)
slug = models.SlugField(
max_length=100,
unique=True
)
color = ColorField(
default=ColorChoices.COLOR_GREY
)
description = models.CharField(
max_length=200,
blank=True,
)
class Meta:
ordering = ['name']
def __str__(self):
return self.name
def get_absolute_url(self):
return reverse('dcim:rackrole', args=[self.pk])