Avoid duplicated notifications

This commit is contained in:
koalasat 2024-09-25 13:46:55 +02:00
parent 98a16e633a
commit a050ed14e3
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -350,6 +350,7 @@ class Order(models.Model):
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>"
)
if old_status != new_status:
send_status_notification.delay(order_id=self.id, status=self.status)