diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-24 08:55:26 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-07-24 08:55:26 +0700 |
| commit | 968f63a411f8cc9e190a261123e47604ce54c2b2 (patch) | |
| tree | 60ad4bb324ccc67ab2e9045def163a413675e968 /indoteknik_custom/models/product_template.py | |
| parent | 2a1179b22cd1b8ee9e3e31c157821dbbeb66195f (diff) | |
fix bug and refactor api product sla
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index 1a83b702..7abdf1c1 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -221,7 +221,7 @@ class ProductTemplate(models.Model): datas = json.loads(response.text)['data'] qty = 0 for data in datas: - availability = int(data['availability']) # Mengonversi ke tipe data int + availability = float(data['availability']) # Mengonversi ke tipe data int qty += availability # Mengakumulasi qty dari setiap data return qty |
