Revert "Avoid duplicated notifications"

This commit is contained in:
KoalaSat 2024-10-01 19:35:03 +00:00 committed by GitHub
parent 9e46ae94cc
commit 28fc426e7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -350,8 +350,7 @@ class Order(models.Model):
self.log( self.log(
f"Order state went from {old_status}: <i>{Order.Status(old_status).label}</i> to {new_status}: <i>{Order.Status(new_status).label}</i>" f"Order state went from {old_status}: <i>{Order.Status(old_status).label}</i> to {new_status}: <i>{Order.Status(new_status).label}</i>"
) )
if old_status != new_status: send_status_notification.delay(order_id=self.id, status=self.status)
send_status_notification.delay(order_id=self.id, status=self.status)
@receiver(pre_delete, sender=Order) @receiver(pre_delete, sender=Order)