Skip to content

Commit

Permalink
bugfix: just ticket's participant type is personal or multiperson wil…
Browse files Browse the repository at this point in the history
…l call send notice script issue
  • Loading branch information
blackholll committed Apr 17, 2019
1 parent 043fa08 commit d745f64
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ def send_ticket_notice(ticket_id):
ticket_obj = TicketRecord.objects.filter(id=ticket_id, is_deleted=0).first()
if not ticket_obj:
return False, 'ticket is not exist or has been deleted'
if ticket_obj.participant_type_id not in (CONSTANT_SERVICE.PARTICIPANT_TYPE_PERSONAL, CONSTANT_SERVICE.PARTICIPANT_TYPE_MULTI):
# 个人及多人的情况才需要发送通知
return True, 'participant is not people, do not need notice'

workflow_id = ticket_obj.workflow_id
workflow_obj = Workflow.objects.filter(id=workflow_id, is_deleted=0).first()
notices = workflow_obj.notices
Expand Down

0 comments on commit d745f64

Please sign in to comment.