[update] 修改remote apps的serializer

This commit is contained in:
ibuler
2020-05-11 12:35:33 +08:00
parent 5571651c02
commit cda677a30f
3 changed files with 22 additions and 1 deletions

View File

@@ -1,9 +1,9 @@
# coding: utf-8
#
from django.db import models
from django.utils.translation import ugettext_lazy as _
from common.utils import lazyproperty
from .base import BasePermission
__all__ = [
@@ -22,3 +22,11 @@ class RemoteAppPermission(BasePermission):
def get_all_remote_apps(self):
return set(self.remote_apps.all())
@lazyproperty
def remote_apps_amount(self):
return self.remote_apps.count()
@lazyproperty
def system_users_amount(self):
return self.system_users.count()