diff --git a/hb_server/apps/wf/services.py b/hb_server/apps/wf/services.py index a3fc2b8..28e7a08 100644 --- a/hb_server/apps/wf/services.py +++ b/hb_server/apps/wf/services.py @@ -95,12 +95,6 @@ class WfService(object): """ 获取下个节点状态 """ - # if ticket: # 如果是新建工单 - # source_state = ticket.state - # else: - # source_state = cls.get_workflow_start_state(workflow) - # if transition.source_state != source_state: - # raise APIException('流转错误') source_state = ticket.state destination_state = transition.destination_state ticket_all_value = cls.get_ticket_all_field_value(ticket) @@ -110,7 +104,7 @@ class WfService(object): expression = i['expression'].format(**ticket_all_value) import datetime, time # 用于支持条件表达式中对时间的操作 if eval(expression): - destination_state = State.objects.get(i['expression'].get('target')) + destination_state = State.objects.get(i['expression'].get('target_state')) return destination_state @classmethod