def update_status(self, status, notes):
        """
        Update the order status
        """

        if status >= Order.CHECKOUT:
            if not self.items.count():
                raise ValidationError(
                    _('Cannot proceed to checkout without order items.'),
                    code='order_empty')

        logger.info((self, status) % 'Promoting %s to status %s')

        instance = OrderStatus(
            order=self,
            status=status,
            notes=notes)
        instance.save()
dataset/ETHPy150Open matthiask/plata/plata/shop/models.py/Order.update_status/swapped operands of `%`