fix: bind_resignation bug
This commit is contained in:
parent
4b377e115c
commit
0c97939165
|
|
@ -502,5 +502,12 @@ def bind_resignation(ticket: Ticket, transition: Transition, new_ticket_data: di
|
|||
ins = Resignation.objects.get(id=new_ticket_data['t_id'])
|
||||
if ins.ticket and ins.ticket.id != ticket.id:
|
||||
raise ParseError('重复创建工单')
|
||||
ticket.create_by = ins.create_by
|
||||
ticket.save()
|
||||
if ins.ticket is None:
|
||||
ticket_data = ticket.ticket_data
|
||||
ticket_data.update({
|
||||
't_model': 'resignation',
|
||||
't_id': ins.id,
|
||||
})
|
||||
ticket.ticket_data = ticket_data
|
||||
ticket.create_by = ins.create_by
|
||||
ticket.save()
|
||||
Loading…
Reference in New Issue