mirror of
https://github.com/clearml/clearml-agent
synced 2025-02-07 13:26:08 +00:00
Fix ENV_API_DEFAULT_REQ_METHOD no default value causes ValueError if not specified
This commit is contained in:
parent
d39e30995a
commit
771690d5c0
@ -26,4 +26,4 @@ POST requests can be used instead.
|
|||||||
|
|
||||||
However this has not been vigorously tested and may have unintended consequences.
|
However this has not been vigorously tested and may have unintended consequences.
|
||||||
"""
|
"""
|
||||||
ENV_API_DEFAULT_REQ_METHOD = EnvEntry("CLEARML_API_DEFAULT_REQ_METHOD")
|
ENV_API_DEFAULT_REQ_METHOD = EnvEntry("CLEARML_API_DEFAULT_REQ_METHOD", default="GET")
|
||||||
|
@ -13,6 +13,7 @@ if ENV_API_DEFAULT_REQ_METHOD.get().upper() not in ("GET", "POST"):
|
|||||||
"CLEARML_API_DEFAULT_REQ_METHOD environment variable must be 'get' or 'post' (any case is allowed)."
|
"CLEARML_API_DEFAULT_REQ_METHOD environment variable must be 'get' or 'post' (any case is allowed)."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class Request(ApiModel):
|
class Request(ApiModel):
|
||||||
_method = ENV_API_DEFAULT_REQ_METHOD.get(default="get")
|
_method = ENV_API_DEFAULT_REQ_METHOD.get(default="get")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user