You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/tickets/signals_handler/ticket.py

16 lines
372 B

# -*- coding: utf-8 -*-
#
from django.dispatch import receiver
from common.utils import get_logger
from tickets.models import Ticket
from ..signals import post_change_ticket_action
logger = get_logger(__name__)
@receiver(post_change_ticket_action, sender=Ticket)
def on_post_change_ticket_action(sender, ticket, action, **kwargs):
ticket.handler.dispatch(action)