feat: 用户授权应用树按组织节点进行区分

This commit is contained in:
Bai
2020-12-08 15:33:24 +08:00
committed by Jiangjie.Bai
parent 4c469afa95
commit 5533114db5
6 changed files with 54 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ from django.core.exceptions import ValidationError
from common.utils import get_logger
from ..utils import (
set_current_org, get_current_org, current_org,
filter_org_queryset, get_org_name_by_id
filter_org_queryset, get_org_by_id, get_org_name_by_id
)
from ..models import Organization
@@ -70,9 +70,7 @@ class OrgModelMixin(models.Model):
@property
def org(self):
from orgs.models import Organization
org = Organization.get_instance(self.org_id)
return org
return get_org_by_id(self.org_id)
@property
def org_name(self):