mirror of https://github.com/jumpserver/jumpserver
stash
parent
5101aae5ae
commit
832228e184
|
@ -1,15 +1,12 @@
|
||||||
from django.db import models
|
# from django.db import models
|
||||||
from django.utils.translation import gettext_lazy as _
|
# from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from assets.const import Category
|
from assets.const import Category
|
||||||
from .common import Asset
|
from .common import Asset
|
||||||
from .device_info import DeviceInfo
|
# from .device_info import DeviceInfo
|
||||||
|
|
||||||
|
|
||||||
class Host(Asset):
|
class Host(Asset):
|
||||||
device_info = models.ForeignKey(DeviceInfo, on_delete=models.SET_NULL,
|
|
||||||
null=True, verbose_name=_("Device info"))
|
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
self.category = Category.HOST
|
self.category = Category.HOST
|
||||||
return super().save(*args, **kwargs)
|
return super().save(*args, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue