From a775622521f7cda25107c03772fe74fcc13d4e68 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Fri, 12 Apr 2024 10:44:56 +0200 Subject: [PATCH] Create ticket change through instance relationship Co-authored-by: Benbb96 --- helpdesk/update_ticket.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helpdesk/update_ticket.py b/helpdesk/update_ticket.py index 5a2e02e1..deca0b40 100644 --- a/helpdesk/update_ticket.py +++ b/helpdesk/update_ticket.py @@ -306,13 +306,11 @@ def update_ticket( ticket.priority = priority if queue != ticket.queue.id: - c = TicketChange( - followup=f, + c = f.ticketchange_set.create( field=_('Queue'), old_value=ticket.queue.id, new_value=queue, ) - c.save() ticket.queue_id = queue if due_date != ticket.due_date: