Add missing imports for custom staff filters

This commit is contained in:
Garret Wassermann 2017-10-30 03:41:49 -04:00
parent 3a1bd76e75
commit 27ee01449e
2 changed files with 5 additions and 11 deletions

View File

@ -18,5 +18,5 @@ register = Library()
def helpdesk_staff(user):
try:
return is_helpdesk_staff(user)
except Exception, e:
except Exception as e:
logger.exception("'helpdesk_staff' template tag (django-helpdesk) crashed")

View File

@ -26,6 +26,10 @@ from django.utils import timezone
from django.utils import six
from helpdesk.decorators import (
helpdesk_staff_member_required, helpdesk_superuser_required,
is_helpdesk_staff
)
from helpdesk.forms import (
TicketForm, UserSettingsForm, EmailIgnoreForm, EditTicketForm, TicketCCForm,
TicketCCEmailForm, TicketCCUserForm, EditFollowUpForm, TicketDependencyForm
@ -178,17 +182,11 @@ def delete_ticket(request, ticket_id):
})
else:
ticket.delete()
<<<<<<< HEAD
return HttpResponseRedirect(reverse('helpdesk:home'))
delete_ticket = staff_member_required(delete_ticket)
=======
return HttpResponseRedirect(reverse('helpdesk_home'))
@helpdesk_staff_member_required
>>>>>>> brente/custom-staff-filter
def followup_edit(request, ticket_id, followup_id):
"""Edit followup options with an ability to change the ticket."""
followup = get_object_or_404(FollowUp, id=followup_id)
@ -639,11 +637,7 @@ def update_ticket(request, ticket_id, public=False):
def return_to_ticket(user, helpdesk_settings, ticket):
<<<<<<< HEAD
"""Helper function for update_ticket"""
=======
""" Helper function for update_ticket """
>>>>>>> brente/custom-staff-filter
if is_helpdesk_staff(user):
return HttpResponseRedirect(ticket.get_absolute_url())