diff --git a/apps/hrm/services.py b/apps/hrm/services.py index 0e94b687..e7405942 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -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() \ No newline at end of file + 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() \ No newline at end of file