diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-04-30 16:43:38 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-04-30 16:43:38 +0700 |
| commit | 7897614cee8a347dfdd933df72db95859cb1a558 (patch) | |
| tree | d491f296af49fcbfb5f2c4395232bc8eb8912ef9 /indoteknik_custom/models/product_template.py | |
| parent | c77d250353dbed0ba1ec5cd8abd940ba95a011fc (diff) | |
fixing handle 15 pm, weekend, and holidays
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
| -rwxr-xr-x | indoteknik_custom/models/product_template.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/product_template.py b/indoteknik_custom/models/product_template.py index e6a01a04..56ae3087 100755 --- a/indoteknik_custom/models/product_template.py +++ b/indoteknik_custom/models/product_template.py @@ -341,6 +341,9 @@ class ProductTemplate(models.Model): 'search_key':[item_code], } response = requests.post(url, headers=headers, json=json_data) + if response.status_code != 200: + return 0 + datas = json.loads(response.text)['data'] qty = 0 for data in datas: |
