Commits

Maciej Wiśniowski  committed 3d8afdb

fix for getting topsellers - avoid empty product_id for discounts

  • Participants
  • Parent commits 0c026be

Comments (0)

Files changed (1)

File lfs/marketing/utils.py

     cursor = connection.cursor()
     cursor.execute("""SELECT product_id, sum(product_amount) as sum
                       FROM order_orderitem
+                      where product_id is not null
                       GROUP BY product_id
                       ORDER BY sum DESC limit %s""" % (limit * 2))