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

Introduce ChangeLoggedModel as a standard model

This commit is contained in:
Jeremy Stretch
2021-03-10 13:35:13 -05:00
parent bac2387f50
commit 19b78e63ce
6 changed files with 19 additions and 12 deletions

View File

@ -9,7 +9,7 @@ from dcim.models import BaseInterface, Device
from extras.models import ConfigContextModel, TaggedItem
from extras.querysets import ConfigContextModelQuerySet
from extras.utils import extras_features
from netbox.models import BigIDModel, ChangeLoggingMixin, OrganizationalModel, PrimaryModel
from netbox.models import ChangeLoggedModel, OrganizationalModel, PrimaryModel
from utilities.fields import NaturalOrderingField
from utilities.ordering import naturalize_interface
from utilities.query_functions import CollateAsChar
@ -374,7 +374,7 @@ class VirtualMachine(PrimaryModel, ConfigContextModel):
# TODO: Inherit from PrimaryModel
@extras_features('export_templates', 'webhooks')
class VMInterface(ChangeLoggingMixin, BigIDModel, BaseInterface):
class VMInterface(ChangeLoggedModel, BaseInterface):
virtual_machine = models.ForeignKey(
to='virtualization.VirtualMachine',
on_delete=models.CASCADE,