summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-04-30 16:43:38 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-04-30 16:43:38 +0700
commit7897614cee8a347dfdd933df72db95859cb1a558 (patch)
treed491f296af49fcbfb5f2c4395232bc8eb8912ef9 /indoteknik_custom/models/product_template.py
parentc77d250353dbed0ba1ec5cd8abd940ba95a011fc (diff)
fixing handle 15 pm, weekend, and holidays
Diffstat (limited to 'indoteknik_custom/models/product_template.py')
-rwxr-xr-xindoteknik_custom/models/product_template.py3
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: