mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-25 06:42:49 +00:00
feat: add assets amount field to platform page
This commit is contained in:
@@ -111,6 +111,10 @@ class Platform(LabeledMixin, JMSBaseModel):
|
||||
def type_constraints(self):
|
||||
return AllTypes.get_constraints(self.category, self.type)
|
||||
|
||||
@lazyproperty
|
||||
def assets_amount(self):
|
||||
return self.assets.count()
|
||||
|
||||
@classmethod
|
||||
def default(cls):
|
||||
linux, created = cls.objects.get_or_create(
|
||||
|
Reference in New Issue
Block a user