From 1b321129a53dcd218cab565f7c47210f70c84fdc Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 21 Feb 2024 14:27:01 +0700 Subject: Update order get active flash sale --- indoteknik_api/models/product_pricelist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_api/models') diff --git a/indoteknik_api/models/product_pricelist.py b/indoteknik_api/models/product_pricelist.py index f05fa82d..0d4247c8 100644 --- a/indoteknik_api/models/product_pricelist.py +++ b/indoteknik_api/models/product_pricelist.py @@ -92,7 +92,7 @@ class ProductPricelist(models.Model): ('is_flash_sale', '=', True), ('start_date', '<=', current_time), ('end_date', '>=', current_time) - ], limit=1) + ], limit=1, order='start_date asc') return pricelist def is_flash_sale_product(self, product_id: int): -- cgit v1.2.3