mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-02-18 03:00:49 +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
|
# render the neutralized template
|
||||||
comment = template_func(comment).render(context)
|
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
|
owner = ticket.assigned_to.id
|
||||||
|
|
||||||
f = FollowUp(ticket=ticket, date=timezone.now(), comment=comment,
|
f = FollowUp(ticket=ticket, date=timezone.now(), comment=comment,
|
||||||
@ -524,7 +524,7 @@ def update_ticket(request, ticket_id, public=False):
|
|||||||
reassigned = False
|
reassigned = False
|
||||||
|
|
||||||
old_owner = ticket.assigned_to
|
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):
|
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)
|
new_user = User.objects.get(id=owner)
|
||||||
f.title = _('Assigned to %(username)s') % {
|
f.title = _('Assigned to %(username)s') % {
|
||||||
|
Loading…
Reference in New Issue
Block a user