Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve readability
Adam Bogdal973e273cbc83
diff --git a/saleor/dashboard/views.py b/saleor/dashboard/views.pyindex 502218f2fd..1cab5dba42 100644--- a/saleor/dashboard/views.py+++ b/saleor/dashboard/views.py@@ -63,10 +63,7 @@ def index(request):def get_low_stock_products():- try:- threshold = settings.LOW_STOCK_THRESHOLD- except AttributeError:- threshold = 10+ threshold = getattr(settings, 'LOW_STOCK_THRESHOLD', 10)products = Product.objects.filter(Q(shirt__variants__stock__lte=threshold) |Q(bag__variants__stock__lte=threshold)).distinct()