mirror of
https://github.com/clearml/clearml-server
synced 2025-04-29 18:31:51 +00:00
Allow arbitrary task fields in project statistics filter
This commit is contained in:
parent
ecffe26be4
commit
60b9c8de14
@ -809,12 +809,11 @@ class ProjectBLL:
|
|||||||
if not filter_:
|
if not filter_:
|
||||||
return conditions
|
return conditions
|
||||||
|
|
||||||
for field in ("tags", "system_tags"):
|
for field, field_filter in filter_.items():
|
||||||
field_filter = filter_.get(field)
|
if not (
|
||||||
if not field_filter:
|
field_filter
|
||||||
continue
|
and isinstance(field_filter, list)
|
||||||
if not isinstance(field_filter, list) or not all(
|
and all(isinstance(t, str) for t in field_filter)
|
||||||
isinstance(t, str) for t in field_filter
|
|
||||||
):
|
):
|
||||||
raise errors.bad_request.ValidationError(
|
raise errors.bad_request.ValidationError(
|
||||||
f"List of strings expected for the field: {field}"
|
f"List of strings expected for the field: {field}"
|
||||||
|
@ -582,15 +582,9 @@ get_all_ex {
|
|||||||
}
|
}
|
||||||
"2.17": ${get_all_ex."2.16"} {
|
"2.17": ${get_all_ex."2.16"} {
|
||||||
request.properties.include_stats_filter {
|
request.properties.include_stats_filter {
|
||||||
description: The filter for selecting entities that participate in statistics calculation
|
description: The filter for selecting entities that participate in statistics calculation. For each task field that you want to filter on pass the list of allowed values. Prepend the value with '-' to exclude
|
||||||
type: object
|
type: object
|
||||||
properties {
|
additionalProperties: true
|
||||||
system_tags {
|
|
||||||
description: The list of allowed system tags
|
|
||||||
type: array
|
|
||||||
items { type: string }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user