diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-29 10:22:25 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-29 10:22:25 +0700 |
| commit | 47e59c2ec810bb6e77180ea4e9896f9c98f246fc (patch) | |
| tree | 71db23397063719966360c741ca0ddc6ae7f4a7a /indoteknik_api | |
| parent | 2343d115f2d9fbaaa14a5f4365369bc49c037d57 (diff) | |
push
Diffstat (limited to 'indoteknik_api')
| -rw-r--r-- | indoteknik_api/models/product_pricelist.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_api/models/product_pricelist.py b/indoteknik_api/models/product_pricelist.py index 2e825740..744faaee 100644 --- a/indoteknik_api/models/product_pricelist.py +++ b/indoteknik_api/models/product_pricelist.py @@ -105,10 +105,12 @@ class ProductPricelist(models.Model): is_show_program = True else: is_show_program = False + + current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S') pricelist = self.search([ ('is_flash_sale', '=', True), - ('is_show_program', '=', is_show_program), + ('is_show_program', '=', True), ('start_date', '<=', current_time), ('end_date', '>=', current_time) ], order='start_date asc') |
