Skip to content

Commit

Permalink
fix: 内置审批服务页面异常 --bug=135855187
Browse files Browse the repository at this point in the history
  • Loading branch information
wenmingchao authored and benero committed Jan 9, 2025
1 parent 8d6a3b7 commit b447160
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions itsm/workflow/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
DateTimeType,
TimeType,
BooleanType,
SelectMultipleType, SelectType,
SelectMultipleType,
SelectType,
)
from common.log import logger
from itsm.component.constants import (
Expand Down Expand Up @@ -192,10 +193,6 @@ class WorkflowViewSet(
permission_free_actions = ["get_global_choices", "list"]
permission_classes = (WorkflowIamAuth,)

def get_queryset(self):
self.queryset = self.queryset.exclude(flow_type="internal")
return self.queryset

@action(detail=False, methods=["get"])
def get_global_choices(self, request):
"""查询全局选项列表信息"""
Expand Down Expand Up @@ -540,7 +537,7 @@ def get_iam_resource_id(self):
if self.action == "batch_update":
return self.request.data.get("workflow_id")
return None

def perform_destroy(self, instance):
# 从开始节点出来的连线只能由一条, 且不能被删除
if instance.from_state.type == START_STATE:
Expand Down Expand Up @@ -750,7 +747,7 @@ class TemplateFieldViewSet(component_viewsets.ModelViewSet):
"destroy": "field_delete",
"update": "field_edit",
}

filter_fields = {
"id": ["in"],
"key": ["exact", "in", "contains", "startswith"],
Expand Down Expand Up @@ -1102,7 +1099,7 @@ class TaskSchemaViewSet(DynamicListModelMixin, component_viewsets.ModelViewSet):
permission_action_platform = "public_task_template_manage"
permission_create_action = ["create", "clone"]
permission_resource_is_project = True

pagination_class = None

def update(self, request, *args, **kwargs):
Expand Down

0 comments on commit b447160

Please sign in to comment.