perf: 优化 labels 绑定资源 (#12361)

* perf: 优化 labels 绑定资源

* perf: 优化 labels list 显示

* perf: add migrations

---------

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2023-12-19 10:20:11 +08:00
committed by GitHub
parent 1358cf532f
commit 1afad40dd3
3 changed files with 2 additions and 3 deletions

View File

@@ -1,10 +1,10 @@
from django.contrib.contenttypes.models import ContentType
from django.utils.functional import LazyObject
class LabeledResourceType(LazyObject):
@staticmethod
def get_res_types():
from rbac.models import ContentType
content_types = ContentType.objects.all()
ids = []
for ct in content_types: