diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 635f5352..28a170ff 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -728,9 +728,12 @@ def update_ticket(request, ticket_id, public=False): c.save() ticket.due_date = due_date - if new_status in (Ticket.RESOLVED_STATUS, Ticket.CLOSED_STATUS): - if new_status == Ticket.RESOLVED_STATUS or ticket.resolution is None: - ticket.resolution = comment + if new_status in ( + Ticket.RESOLVED_STATUS, Ticket.CLOSED_STATUS + ) and ( + new_status == Ticket.RESOLVED_STATUS or ticket.resolution is None + ): + ticket.resolution = comment # ticket might have changed above, so we re-instantiate context with the # (possibly) updated ticket.