producteca 2.0.39__py3-none-any.whl → 2.0.40__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of producteca might be problematic. Click here for more details.
- producteca/products/products.py +4 -5
- {producteca-2.0.39.dist-info → producteca-2.0.40.dist-info}/METADATA +1 -1
- {producteca-2.0.39.dist-info → producteca-2.0.40.dist-info}/RECORD +6 -6
- {producteca-2.0.39.dist-info → producteca-2.0.40.dist-info}/LICENSE +0 -0
- {producteca-2.0.39.dist-info → producteca-2.0.40.dist-info}/WHEEL +0 -0
- {producteca-2.0.39.dist-info → producteca-2.0.40.dist-info}/entry_points.txt +0 -0
producteca/products/products.py
CHANGED
|
@@ -262,6 +262,10 @@ class ProductService(BaseService):
|
|
|
262
262
|
raise Exception("Sku or code should be provided to update the product")
|
|
263
263
|
data = product_variation.model_dump(by_alias=True, exclude_none=True)
|
|
264
264
|
response = requests.post(endpoint_url, json=data, headers=headers)
|
|
265
|
+
if not response.ok:
|
|
266
|
+
raise Exception(f"Error getting product {product_variation.sku} - {product_variation.code}\n {response.text}")
|
|
267
|
+
if response.status_code == 204:
|
|
268
|
+
raise Exception("Status code is 204, meaning nothing was updated or created")
|
|
265
269
|
response_data = response.json()
|
|
266
270
|
try:
|
|
267
271
|
return Product(**response_data)
|
|
@@ -286,11 +290,6 @@ class ProductService(BaseService):
|
|
|
286
290
|
raise Exception(f"Errored with the following message {error_res.message} - {error_res.model_dump_json()}")
|
|
287
291
|
except ValidationError:
|
|
288
292
|
pass
|
|
289
|
-
|
|
290
|
-
if not response.ok:
|
|
291
|
-
raise Exception(f"Error getting product {product_variation.sku} - {product_variation.code}\n {response.text}")
|
|
292
|
-
if response.status_code == 204:
|
|
293
|
-
raise Exception("Status code is 204, meaning nothing was updated or created")
|
|
294
293
|
raise Exception(f"Unhandled error, check response {response.text}")
|
|
295
294
|
|
|
296
295
|
def get(self, product_id: int) -> "ProductService":
|
|
@@ -9,7 +9,7 @@ producteca/payments/payments.py,sha256=ac0X-QC4CGvxs40B_qWv0IepBVpj_nULNSNp8s3v5
|
|
|
9
9
|
producteca/payments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
producteca/payments/tests/test_payments.py,sha256=wutk5zK2xRChTvKyTmi54Y_92PzNtUKZF6xWF298sFY,3032
|
|
11
11
|
producteca/products/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
producteca/products/products.py,sha256=
|
|
12
|
+
producteca/products/products.py,sha256=IHM-lQ1VSGIqaUxgr5wKhT1rkFT6c2QAjnrefUOoEQg,12859
|
|
13
13
|
producteca/products/search_products.py,sha256=8qKPhwHWq-QzRc3-oZKlMaQQN4Et2iUWm4uxOGWXzFc,6172
|
|
14
14
|
producteca/products/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
producteca/products/tests/test_products.py,sha256=0Tph7T9D2XTLdTDoIpR2PcLTrvPt6h2LPuKowTXrDgU,5742
|
|
@@ -25,8 +25,8 @@ producteca/shipments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
25
25
|
producteca/shipments/shipment.py,sha256=YokJRBX1ZbUtZVc4AOAB188rbHFO0_MH5hFv5U9Qpjw,844
|
|
26
26
|
producteca/shipments/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
producteca/shipments/tests/test_shipment.py,sha256=0edX3WM-t4nbp53r_Lvhtk_Suc2QCnIUQ27I90qSUfE,2512
|
|
28
|
-
producteca-2.0.
|
|
29
|
-
producteca-2.0.
|
|
30
|
-
producteca-2.0.
|
|
31
|
-
producteca-2.0.
|
|
32
|
-
producteca-2.0.
|
|
28
|
+
producteca-2.0.40.dist-info/LICENSE,sha256=DZak_2itbUtvHzD3E7GNUYSRK6jdOJ-GqncQ2weavLA,34523
|
|
29
|
+
producteca-2.0.40.dist-info/METADATA,sha256=-m4yt_B7JGPYuOeDKoVhCikbKOg5Vdv_G8_dISUi47I,3809
|
|
30
|
+
producteca-2.0.40.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
31
|
+
producteca-2.0.40.dist-info/entry_points.txt,sha256=BFSDFLbB70p8YVZPiU7HDJdj2VyyLdMVa4ekLQAUAVc,125
|
|
32
|
+
producteca-2.0.40.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|