summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/product_template.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-06-16 01:39:22 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-06-16 01:39:22 +0000
commit27bfdedcb547fdf9f4cca084c77f966375f748f0 (patch)
tree627a7bf82b6f664037a62d4ffbf451262d0ad526 /indoteknik_custom/models/product_template.py
parentb87f89b8af2731e02d6ab095c3e92e48b39b4f6c (diff)
parentdf02e9c6f0db21b43ae25d77c7072a5dd15f9848 (diff)
Merged in biteship-v1 (pull request #329)
Biteship v1
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: