mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
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()
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user