Create ticket change through instance relationship

Co-authored-by: Benbb96 <Benbb96@users.noreply.github.com>
This commit is contained in:
Sam Splunks 2024-04-12 10:44:56 +02:00 committed by GitHub
parent 5b39c9aeeb
commit a775622521
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -306,13 +306,11 @@ def update_ticket(
ticket.priority = priority ticket.priority = priority
if queue != ticket.queue.id: if queue != ticket.queue.id:
c = TicketChange( c = f.ticketchange_set.create(
followup=f,
field=_('Queue'), field=_('Queue'),
old_value=ticket.queue.id, old_value=ticket.queue.id,
new_value=queue, new_value=queue,
) )
c.save()
ticket.queue_id = queue ticket.queue_id = queue
if due_date != ticket.due_date: if due_date != ticket.due_date: