8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Pas d'envoit de mail pour les updates

This commit is contained in:
Grizzly 2019-08-10 22:41:33 +00:00 committed by Gabriel Detraz
parent 6440ac48e8
commit 295f7fa5fa

View file

@ -72,6 +72,7 @@ class Preferences(models.Model):
@receiver(post_save, sender=Ticket) @receiver(post_save, sender=Ticket)
def ticket_post_save(**kwargs): def ticket_post_save(**kwargs):
"""Envoit du mail de publication du ticket""" """Envoit du mail de publication du ticket"""
if Preferences.objects.first().publish_address: if kwargs['created']:
ticket = kwargs['instance'] if Preferences.objects.first().publish_address:
ticket.publish_mail() ticket = kwargs['instance']
ticket.publish_mail()