mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 09:23:39 +01:00
Follow recommendation to use == instead of keyword is
This commit is contained in:
parent
0f52aecb5c
commit
1784d5cf60
@ -510,7 +510,7 @@ def update_ticket(request, ticket_id, public=False):
|
||||
# render the neutralized template
|
||||
comment = template_func(comment).render(context)
|
||||
|
||||
if owner is -1 and ticket.assigned_to:
|
||||
if owner == -1 and ticket.assigned_to:
|
||||
owner = ticket.assigned_to.id
|
||||
|
||||
f = FollowUp(ticket=ticket, date=timezone.now(), comment=comment,
|
||||
@ -524,7 +524,7 @@ def update_ticket(request, ticket_id, public=False):
|
||||
reassigned = False
|
||||
|
||||
old_owner = ticket.assigned_to
|
||||
if owner is not -1:
|
||||
if owner != -1:
|
||||
if owner != 0 and ((ticket.assigned_to and owner != ticket.assigned_to.id) or not ticket.assigned_to):
|
||||
new_user = User.objects.get(id=owner)
|
||||
f.title = _('Assigned to %(username)s') % {
|
||||
|
Loading…
Reference in New Issue
Block a user