diff --git a/apps/wf/services.py b/apps/wf/services.py index f28714df..d6d46738 100755 --- a/apps/wf/services.py +++ b/apps/wf/services.py @@ -206,6 +206,8 @@ class WfService(object): if len(destination_participant) == 1: # 如果只有一个人 destination_participant_type = State.PARTICIPANT_TYPE_PERSONAL destination_participant = destination_participant[0] + elif destination_participant_type == State.PARTICIPANT_TYPE_ROBOT: + pass else: destination_participant_type = State.PARTICIPANT_TYPE_PERSONAL if destination_participant_type == State.PARTICIPANT_TYPE_MULTI: diff --git a/apps/wf/views.py b/apps/wf/views.py index bd939237..45c7b7b1 100755 --- a/apps/wf/views.py +++ b/apps/wf/views.py @@ -441,7 +441,7 @@ class TicketViewSet(CreateUpdateCustomMixin, CreateModelMixin, ListModelMixin, R ticket = self.get_object() if not ticket.script_run_last_result: ticket.script_run_last_result = True - run_task(ticket.id) + run_task.delay(ticket.id) return Response()