From 776f12554263df0b24691ef3018f33aa67d107a3 Mon Sep 17 00:00:00 2001 From: Ross Poulton Date: Mon, 25 Jan 2010 23:59:16 +0000 Subject: [PATCH] Fix issue #129 - can not 'unassign' tickets. Thanks to lukeman for the patch. --- CHANGELOG | 3 +++ views/staff.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f5de47ca..4722f6aa 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,3 +41,6 @@ Andreas Kotowicz. 2009-01-20 r151 Issue #128 If queue name has a dash in it, email imported failed. Thanks to enix.org for the patch. 2010-01-21 r152 Fix indentation error caused by issue #126. + +2010-01-26 r153 Fix issue #129 - can not 'unassign' tickets. Thanks to +lukeman for the patch. diff --git a/views/staff.py b/views/staff.py index aefbea90..4af4f0f8 100644 --- a/views/staff.py +++ b/views/staff.py @@ -154,7 +154,7 @@ def update_ticket(request, ticket_id, public=False): context = safe_template_context(ticket) comment = loader.get_template_from_string(comment).render(Context(context)) - if not owner and ticket.assigned_to: + if owner is None and ticket.assigned_to: owner = ticket.assigned_to.id f = FollowUp(ticket=ticket, date=datetime.now(), comment=comment) @@ -166,7 +166,7 @@ def update_ticket(request, ticket_id, public=False): reassigned = False - if owner: + if owner is not None: 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') % {