Commits

Maciej Wiśniowski committed 2ac5357

fix AttributeError for OrderItems without product

  • Participants
  • Parent commits 582ca19

Comments (0)

Files changed (1)

lfs/marketing/utils.py

     ProductSales.objects.all().delete()
 
     products = {}
-    for order_item in OrderItem.objects.all():
+    for order_item in OrderItem.objects.filter(product__isnull=False):
         if order_item.product.is_variant():
             product = order_item.product.parent
             if product is None: