jumpserver/apps/tickets/signal_handlers/comment.py

10 lines
238 B
Python

from django.db.models.signals import pre_save
from django.dispatch import receiver
from ..models import Comment
@receiver(pre_save, sender=Comment)
def on_comment_pre_save(sender, instance, **kwargs):
instance.set_display_fields()