diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-29 14:54:41 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-29 14:54:41 +0700 |
| commit | 840bc3f8c04933a56a31c279ef6e220c277bd36d (patch) | |
| tree | 115430a3876c80b5a5429b747fd97e2ba89bf43c /indoteknik_api/models | |
| parent | 47e59c2ec810bb6e77180ea4e9896f9c98f246fc (diff) | |
push
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/product_pricelist.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/models/product_pricelist.py b/indoteknik_api/models/product_pricelist.py index 744faaee..3ba38940 100644 --- a/indoteknik_api/models/product_pricelist.py +++ b/indoteknik_api/models/product_pricelist.py @@ -106,11 +106,11 @@ class ProductPricelist(models.Model): 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', '=', True), + ('is_show_program', '=', is_show_program), ('start_date', '<=', current_time), ('end_date', '>=', current_time) ], order='start_date asc') |
