forked from extern/django-helpdesk
Combine conditionals to single line
This commit is contained in:
parent
f815ebbb5c
commit
fe619b5ff2
@ -728,9 +728,12 @@ def update_ticket(request, ticket_id, public=False):
|
|||||||
c.save()
|
c.save()
|
||||||
ticket.due_date = due_date
|
ticket.due_date = due_date
|
||||||
|
|
||||||
if new_status in (Ticket.RESOLVED_STATUS, Ticket.CLOSED_STATUS):
|
if new_status in (
|
||||||
if new_status == Ticket.RESOLVED_STATUS or ticket.resolution is None:
|
Ticket.RESOLVED_STATUS, Ticket.CLOSED_STATUS
|
||||||
ticket.resolution = comment
|
) 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
|
# ticket might have changed above, so we re-instantiate context with the
|
||||||
# (possibly) updated ticket.
|
# (possibly) updated ticket.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user