feat: 添加缓存模块,添加组织资源统计 (#5407)

* feat: 添加缓存模块,添加组织资源统计

* refactor

* recover .gitkeep

* refactor

* 合并信号处理

* 修复组织添加用户没有发信号

* 修改了一个log级别

Co-authored-by: xinwen <coderWen@126.com>
This commit is contained in:
fit2bot
2021-01-17 12:08:21 +08:00
committed by GitHub
parent f04e2fa090
commit a7fa2331bd
13 changed files with 430 additions and 12 deletions

View File

@@ -18,7 +18,7 @@ from django.shortcuts import reverse
from common.local import LOCAL_DYNAMIC_SETTINGS
from orgs.utils import current_org
from orgs.models import OrganizationMember
from orgs.models import OrganizationMember, Organization
from common.utils import date_expired_default, get_logger, lazyproperty
from common import fields
from common.const import choices
@@ -327,7 +327,8 @@ class RoleMixin:
def remove(self):
if not current_org.is_real():
return
OrganizationMember.objects.remove_users(current_org, [self])
org = Organization.get_instance(current_org.id)
OrganizationMember.objects.remove_users(org, [self])
@classmethod
def get_super_admins(cls):