diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-11-21 16:29:05 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-11-21 16:29:05 +0700 |
| commit | 4e84a3c939f50315c5eba4a9ae350f17383b5543 (patch) | |
| tree | 4af6f11434249fb2c7a396e68d55496c418f896e | |
| parent | b9bdfb05f96affaeec8e197b6585df140d4cd11c (diff) | |
<iman> perbaiki code is_in_bu logic
| -rw-r--r-- | indoteknik_custom/models/solr/product_product.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/solr/product_product.py b/indoteknik_custom/models/solr/product_product.py index dd1d40f6..667511b2 100644 --- a/indoteknik_custom/models/solr/product_product.py +++ b/indoteknik_custom/models/solr/product_product.py @@ -54,7 +54,7 @@ class ProductProduct(models.Model): ('location_id', 'in', target_locations), ]) - is_in_bu = any(quant.available_quantity > 0 for quant in stock_quant) + is_in_bu = True if variant.qty_free_bandengan > 0 else False document = solr_model.get_doc('variants', variant.id) |
