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

#6454 add prerequisite alert

This commit is contained in:
Arthur
2022-08-18 15:11:03 -07:00
parent eb3d3dcbc4
commit 928dff6b68
11 changed files with 74 additions and 8 deletions

View File

@@ -1,3 +1,4 @@
from django.apps import apps
from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import ValidationError
from django.db import models
@@ -129,6 +130,10 @@ class Circuit(NetBoxModel):
def __str__(self):
return self.cid
@classmethod
def get_prerequisite_models(cls):
return [apps.get_model('circuits.Provider'), CircuitType]
def get_absolute_url(self):
return reverse('circuits:circuit', args=[self.pk])