From cc5a3c4dac97a469b72f2330169f0f39373b1e7f Mon Sep 17 00:00:00 2001 From: blackholll Date: Thu, 16 May 2019 23:05:09 +0800 Subject: [PATCH] bugfix: ticket_handle_permission_check return wrong format data when by_timer or by_task handle --- service/ticket/ticket_base_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/service/ticket/ticket_base_service.py b/service/ticket/ticket_base_service.py index fac5dfba..e7f5411a 100644 --- a/service/ticket/ticket_base_service.py +++ b/service/ticket/ticket_base_service.py @@ -824,16 +824,16 @@ def ticket_handle_permission_check(cls, ticket_id, username, by_timer=False, by_ ticket_state_id = ticket_obj.state_id transition_queryset, msg = WorkflowTransitionService.get_state_transition_queryset(ticket_state_id) if not transition_queryset: - return None, '工单当前状态无需操作' + return False, '工单当前状态无需操作' state_obj, msg = WorkflowStateService.get_workflow_state_by_id(ticket_state_id) if not state_obj: return False, '工单当前状态id不存在或已被删除' if by_timer and username == 'loonrobot': # 定时器流转,有权限 - return True, '定时器流转,放开处理权限' + return True, dict(need_accept=False, in_add_node=False, msg='定时器流转,放开处理权限') if by_task and username == 'loonrobot': # 脚本流转,有权限 - return True, '脚本流转,放开处理权限' + return True, dict(need_accept=False, in_add_node=False, msg='脚本流转,放开处理权限') participant_type_id = ticket_obj.participant_type_id participant = ticket_obj.participant