[FIX] HORILLA: Distutils dependancy removed
This commit is contained in:
@@ -12,6 +12,7 @@ from django.utils.decorators import method_decorator
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from base.models import Attachment
|
||||
from employee.models import Employee
|
||||
from helpdesk.cbv.tags import DynamicTagsCreateFormView
|
||||
from helpdesk.filter import TicketTypeFilter
|
||||
from helpdesk.forms import TicketForm, TicketTypeForm
|
||||
@@ -213,7 +214,25 @@ class TicketsCreateFormView(HorillaFormView):
|
||||
employees = ticket.assigned_to.all()
|
||||
assignees = [employee.employee_user_id for employee in employees]
|
||||
assignees.append(ticket.employee_id.employee_user_id)
|
||||
if hasattr(ticket.get_raised_on_object(), "dept_manager"):
|
||||
|
||||
if ticket.assigning_type == "individual":
|
||||
try:
|
||||
employee = Employee.objects.get(
|
||||
id=ticket.raised_on
|
||||
) # adjust if raised_on stores badge_id etc.
|
||||
ticket.assigned_to.set([employee])
|
||||
ticket.save()
|
||||
except Employee.DoesNotExist:
|
||||
print(f"No employee found with identifier: {ticket.raised_on}")
|
||||
|
||||
employees = ticket.assigned_to.all()
|
||||
assignees = [emp.employee_user_id for emp in employees]
|
||||
assignees.append(ticket.employee_id.employee_user_id)
|
||||
|
||||
if (
|
||||
hasattr(ticket.get_raised_on_object(), "dept_manager")
|
||||
and not ticket.assigning_type == "individual"
|
||||
):
|
||||
if ticket.get_raised_on_object().dept_manager.all():
|
||||
manager = (
|
||||
ticket.get_raised_on_object()
|
||||
|
||||
@@ -75,6 +75,10 @@ logger = logging.getLogger(__name__)
|
||||
# Create your views here.
|
||||
|
||||
|
||||
def strtobool(val):
|
||||
return str(val).lower() in ("y", "yes", "t", "true", "on", "1")
|
||||
|
||||
|
||||
def strtobool(val):
|
||||
return str(val).lower() in ("y", "yes", "t", "true", "on", "1")
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ def notifications_unread(context):
|
||||
return user.notifications.unread().count()
|
||||
|
||||
|
||||
# notifications_unread = register.simple_tag(takes_context=True)(notifications_unread)
|
||||
notifications_unread = register.simple_tag(takes_context=True)(notifications_unread)
|
||||
|
||||
|
||||
@register.filter
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
""" Django Notifications example views """
|
||||
|
||||
|
||||
from django import get_version
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.forms import model_to_dict
|
||||
|
||||
Reference in New Issue
Block a user