From f09dd6eb4e2213881c58af564f98affc26933f2d Mon Sep 17 00:00:00 2001 From: vapao Date: Thu, 8 Sep 2022 16:13:49 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E5=85=B3=E8=81=94=E8=B4=A6=E6=88=B7=E6=95=B0=E9=87=8F=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/account/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/account/models.py b/spug_api/apps/account/models.py index 80cafff..b5bc60c 100644 --- a/spug_api/apps/account/models.py +++ b/spug_api/apps/account/models.py @@ -100,7 +100,7 @@ class Role(models.Model, ModelMixin): tmp['page_perms'] = json.loads(self.page_perms) if self.page_perms else {} tmp['deploy_perms'] = json.loads(self.deploy_perms) if self.deploy_perms else {} tmp['group_perms'] = json.loads(self.group_perms) if self.group_perms else [] - tmp['used'] = self.user_set.count() + tmp['used'] = self.user_set.filter(deleted_by_id__isnull=True).count() return tmp def add_deploy_perm(self, target, value):