diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 1e09328b..c1a9b388 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -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') % {