diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-07-11 10:32:54 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-07-11 10:32:54 +0700 |
| commit | 94224e3174bf1370ae8e4ced3271d78beba83cfb (patch) | |
| tree | f69395c1ce18eb84e10aa2c51e45e347f7fd1a18 | |
| parent | e1af064ea7c6be76e96719382f4de8245b89dc5f (diff) | |
Update get active voucher order by lowest min_purchase_amount
| -rw-r--r-- | indoteknik_custom/models/voucher.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/voucher.py b/indoteknik_custom/models/voucher.py index 6a166cf3..23285b3a 100644 --- a/indoteknik_custom/models/voucher.py +++ b/indoteknik_custom/models/voucher.py @@ -69,5 +69,5 @@ class Voucher(models.Model): ('start_time', '<=', current_time), ('end_time', '>=', current_time), ] - vouchers = self.search(parameter) + vouchers = self.search(parameter, order='min_purchase_amount ASC') return vouchers
\ No newline at end of file |
