File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def __init__(self, api_token: Optional[str] = None) -> None:
30
30
total = 5 ,
31
31
backoff_factor = 2 ,
32
32
# Only retry 500s on GET so we don't unintionally mutute data
33
- method_whitelist = ["GET" ],
33
+ allowed_methods = ["GET" ],
34
34
# https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors
35
35
status_forcelist = [
36
36
429 ,
@@ -54,7 +54,7 @@ def __init__(self, api_token: Optional[str] = None) -> None:
54
54
write_retries = Retry (
55
55
total = 5 ,
56
56
backoff_factor = 2 ,
57
- method_whitelist = ["POST" , "PUT" ],
57
+ allowed_methods = ["POST" , "PUT" ],
58
58
# Only retry POST/PUT requests on rate limits, so we don't unintionally mutute data
59
59
status_forcelist = [429 ],
60
60
)
Original file line number Diff line number Diff line change @@ -36,5 +36,8 @@ def create(self, **kwargs) -> Model:
36
36
raise NotImplementedError ()
37
37
38
38
def prepare_model (self , attrs : Union [Model , Dict ]) -> Model :
39
- attrs ["id" ] = f"{ attrs ['username' ]} /{ attrs ['name' ]} "
39
+ if isinstance (attrs , BaseModel ):
40
+ attrs .id = f"{ attrs .username } /{ attrs .name } "
41
+ elif isinstance (attrs , dict ):
42
+ attrs ["id" ] = f"{ attrs ['username' ]} /{ attrs ['name' ]} "
40
43
return super ().prepare_model (attrs )
You can’t perform that action at this time.
0 commit comments