def return_to_ticket(user, helpdesk_settings, ticket):

    if user.is_staff or helpdesk_settings.HELPDESK_ALLOW_NON_STAFF_TICKET_UPDATE:
        return HttpResponseRedirect(ticket.get_absolute_url())
    else:
        return HttpResponseRedirect(ticket.ticket_url)
Helpder function for update_ticket
dataset/ETHPy150Open rossp/django-helpdesk/helpdesk/views/staff.py/return_to_ticket