mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修改创建label时报错的bug
parent
97dd411ab8
commit
1c7212014b
|
@ -29,6 +29,10 @@ class Label(models.Model):
|
|||
for name in names:
|
||||
yield name, cls.objects.filter(name=name)
|
||||
|
||||
@property
|
||||
def asset_count(self):
|
||||
return self.assets.count()
|
||||
|
||||
def __str__(self):
|
||||
return "{}:{}".format(self.name, self.value)
|
||||
|
||||
|
|
Loading…
Reference in New Issue