summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-06-18 11:16:12 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-06-18 11:16:12 +0700
commit1a6ad278493ef88e01485d72ebc697b61aec077a (patch)
treef0db9f96cea9cd2a3e490d01b2dd1e0020fb0bf3 /indoteknik_custom/models/product_template.py
parent9d7d71f23de6335464d96d2a04ba8b36db620105 (diff)
parentcca31a5f582e097518701a192d4cda88525fc979 (diff)
<hafid> merging & fix tempo
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 2c07824a..f59bea6b 100755
--- a/indoteknik_custom/models/product_template.py
+++ b/indoteknik_custom/models/product_template.py
@@ -349,6 +349,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: