def save(self, *args, **kwargs):
        super(OrderStatus, self).save(*args, **kwargs)
        self.order.status = self.status
        if self.status == Order.CONFIRMED:
            self.order.confirmed = timezone.now()
        elif self.status > Order.CONFIRMED and not self.order.confirmed:
            self.order.confirmed = timezone.now()
        elif self.status < Order.CONFIRMED:
            # Ensure that the confirmed date is not set
            self.order.confirmed = None
        self.order.save()
dataset/ETHPy150Open matthiask/plata/plata/shop/models.py/OrderStatus.save/original