mirror of
https://github.com/clearml/clearml-server
synced 2025-06-26 06:25:47 +00:00
Better handling of execution parameter paths
This commit is contained in:
parent
d6321588f3
commit
1834abe5bc
@ -111,12 +111,18 @@ def escape_execution_parameters(call: APICall):
|
|||||||
default_prefix = "execution.parameters."
|
default_prefix = "execution.parameters."
|
||||||
|
|
||||||
def escape_paths(paths, prefix=default_prefix):
|
def escape_paths(paths, prefix=default_prefix):
|
||||||
return [
|
escaped_paths = []
|
||||||
prefix + ParameterKeyEscaper.escape(path[len(prefix) :])
|
for path in paths:
|
||||||
if path.startswith(prefix)
|
if path == prefix:
|
||||||
else path
|
raise errors.bad_request.ValidationError(
|
||||||
for path in paths
|
"invalid task field", path=path
|
||||||
]
|
)
|
||||||
|
escaped_paths.append(
|
||||||
|
prefix + ParameterKeyEscaper.escape(path[len(prefix) :])
|
||||||
|
if path.startswith(prefix)
|
||||||
|
else path
|
||||||
|
)
|
||||||
|
return escaped_paths
|
||||||
|
|
||||||
projection = Task.get_projection(call.data)
|
projection = Task.get_projection(call.data)
|
||||||
if projection:
|
if projection:
|
||||||
|
Loading…
Reference in New Issue
Block a user