Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Update view for low stock products
Marcin Gębala72b8bb58ba16
diff --git a/saleor/dashboard/views.py b/saleor/dashboard/views.pyindex 9f18a98f98..594c310630 100644--- a/saleor/dashboard/views.py+++ b/saleor/dashboard/views.py@@ -61,6 +61,5 @@ def index(request):def get_low_stock_products():threshold = getattr(settings, 'LOW_STOCK_THRESHOLD', 10)products = Product.objects.filter(- Q(shirt__variants__stock__lte=threshold) |- Q(bag__variants__stock__lte=threshold)).distinct()+ Q(variants__stock__quantity__lte=threshold)).distinct()return products