perf: 修改 labels 绑定引起的问题

This commit is contained in:
ibuler
2023-12-19 18:42:44 +08:00
committed by Bryan
parent 45425b11d2
commit 0b7552a6ee
8 changed files with 28 additions and 10 deletions

View File

@@ -20,6 +20,10 @@ class Label(JMSOrgBaseModel):
def res_count(self):
return self.labeled_resources.count()
@lazyproperty
def display_name(self):
return '{}:{}'.format(self.name, self.value)
def __str__(self):
return '{}:{}'.format(self.name, self.value)