@cached_property
    def unfulfilled_items(self):
        unfulfilled_items = 0
        for order_item in self.items.all():
            if not order_item.canceled:
                aggr = order_item.deliveryitem_set.aggregate(delivered=Sum('quantity'))
                unfulfilled_items += (aggr['delivered'] or 0) - order_item.quantity
        return unfulfilled_items
dataset/ETHPy150Open awesto/django-shop/shop/shipping/delivery.py/PartialDeliveryWorkflowMixin.unfulfilled_items/swapped operands of `-`