File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,8 @@ def post_entity(
261
261
return res .headers .get ("Location" )
262
262
res .raise_for_status ()
263
263
except requests .RequestException as err :
264
+ if err .response is None :
265
+ raise
264
266
if update and err .response .status_code == 422 :
265
267
return self .override_entity (entity = entity , key_values = key_values )
266
268
if patch and err .response .status_code == 422 :
@@ -2078,7 +2080,7 @@ def patch_entity(
2078
2080
except requests .RequestException as err :
2079
2081
# if the attribute is provided by a registration the
2080
2082
# deletion will fail
2081
- if not err .response .status_code == 404 :
2083
+ if err . response is None or not err .response .status_code == 404 :
2082
2084
raise
2083
2085
else :
2084
2086
# Check if attributed changed in any way, if yes update
@@ -2094,7 +2096,7 @@ def patch_entity(
2094
2096
except requests .RequestException as err :
2095
2097
# if the attribute is provided by a registration the
2096
2098
# update will fail
2097
- if not err .response .status_code == 404 :
2099
+ if err . response is None or not err .response .status_code == 404 :
2098
2100
raise
2099
2101
2100
2102
# Create new attributes
You can’t perform that action at this time.
0 commit comments