summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-02-21 14:27:01 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-02-21 14:27:01 +0700
commit1b321129a53dcd218cab565f7c47210f70c84fdc (patch)
tree91e842eee46a19bb2e8e08c7aefda75f2254ce14
parenta6f6092fef773e9a23ae596c4a6757971aaa9b1f (diff)
Update order get active flash sale
-rw-r--r--indoteknik_api/models/product_pricelist.py2
1 files changed, 1 insertions, 1 deletions
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):