Skip to content

Commit

Permalink
bugfix: ticket_handle_permission_check return wrong format data when …
Browse files Browse the repository at this point in the history
…by_timer or by_task handle
  • Loading branch information
blackholll committed May 16, 2019
1 parent cbbc724 commit cc5a3c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/ticket/ticket_base_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc5a3c4

Please sign in to comment.