Fix issue #129 - can not 'unassign' tickets. Thanks to

lukeman for the patch.
This commit is contained in:
Ross Poulton 2010-01-25 23:59:16 +00:00
parent dfc2a2f768
commit 776f125542
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -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') % {