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

Use strings to specify prerequisite models

This commit is contained in:
jeremystretch
2022-11-16 17:22:09 -05:00
parent f411c4f439
commit ebf555e1fb
12 changed files with 61 additions and 86 deletions

View File

@ -1,4 +1,3 @@
from django.apps import apps
from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
@ -193,10 +192,6 @@ class WirelessLink(WirelessAuthenticationBase, PrimaryModel):
def __str__(self):
return f'#{self.pk}'
@classmethod
def get_prerequisite_models(cls):
return [apps.get_model('dcim.Interface'), ]
def get_absolute_url(self):
return reverse('wireless:wirelesslink', args=[self.pk])