mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-21 11:28:38 +00:00
fix: 修复工单流bug 添加登陆审核配置
This commit is contained in:
@@ -6,6 +6,7 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from common.mixins.models import CommonModelMixin
|
||||
from common.db.encoder import ModelJSONFieldEncoder
|
||||
from orgs.mixins.models import OrgModelMixin
|
||||
from orgs.models import Organization
|
||||
from orgs.utils import tmp_to_root_org
|
||||
from ..const import TicketType, TicketApprovalLevel, TicketApprovalStrategy
|
||||
from ..signals import post_or_update_change_ticket_flow_approval
|
||||
@@ -67,5 +68,5 @@ class TicketFlow(CommonModelMixin, OrgModelMixin):
|
||||
flows = cls.objects.all()
|
||||
cur_flow_types = flows.values_list('type', flat=True)
|
||||
with tmp_to_root_org():
|
||||
diff_global_flows = cls.objects.exclude(type__in=cur_flow_types)
|
||||
diff_global_flows = cls.objects.exclude(type__in=cur_flow_types).filter(org_id=Organization.ROOT_ID)
|
||||
return flows | diff_global_flows
|
||||
|
Reference in New Issue
Block a user