perf(perms): 应用授权表添加字段,type和category

This commit is contained in:
Bai
2020-10-28 12:14:14 +08:00
committed by 老广
parent 8fa15b3378
commit 77c8ca5863
3 changed files with 47 additions and 12 deletions

View File

@@ -133,4 +133,6 @@ class Application(CommonModelMixin, OrgModelMixin):
ordering = ('name',)
def __str__(self):
return '{}({})'.format(self.name, self.get_category_display())
category_display = self.get_category_display()
type_display = self.get_type_display()
return f'{self.name}({type_display})[{category_display}]'