[Bf-extensions-cvs] [80be53db] master: BlenderKit: wrong status code interpretation caused uploads to fail

Vilem Duha noreply at git.blender.org
Mon Jun 24 21:40:21 CEST 2019


Commit: 80be53db6fdbeef56982abc1c93478e916a2b9f4
Author: Vilem Duha
Date:   Mon Jun 24 21:39:20 2019 +0200
Branches: master
https://developer.blender.org/rBA80be53db6fdbeef56982abc1c93478e916a2b9f4

BlenderKit: wrong status code interpretation caused uploads to fail

===================================================================

M	blenderkit/upload.py

===================================================================

diff --git a/blenderkit/upload.py b/blenderkit/upload.py
index ee4df45b..09604290 100644
--- a/blenderkit/upload.py
+++ b/blenderkit/upload.py
@@ -648,7 +648,7 @@ def start_upload(self, context, asset_type, as_new, metadata_only):
     try:
         rj = r.json()
         utils.pprint(rj)
-        if r.status_code != 200:
+        if r.status_code not in (200, 201):
             if r.status_code == 401:
                 ui.add_report(r.detail, 5, colors.RED)
             return {'CANCELLED'}



More information about the Bf-extensions-cvs mailing list