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

Introduced ability to edit/delete modules

This commit is contained in:
Jeremy Stretch
2016-06-15 13:27:12 -04:00
parent 4258e40ec1
commit 4b34af3e1d
10 changed files with 182 additions and 6 deletions

View File

@@ -692,7 +692,6 @@ class InterfaceConnection(models.Model):
verbose_name='Status')
def clean(self):
if self.interface_a == self.interface_b:
raise ValidationError("Cannot connect an interface to itself")
@@ -706,6 +705,7 @@ class Module(models.Model):
name = models.CharField(max_length=50, verbose_name='Name')
part_id = models.CharField(max_length=50, verbose_name='Part ID', blank=True)
serial = models.CharField(max_length=50, verbose_name='Serial number', blank=True)
discovered = models.BooleanField(default=False, verbose_name='Discovered')
class Meta:
ordering = ['device__id', 'parent__id', 'name']