mirror of
https://github.com/clearml/clearml-server
synced 2025-02-12 07:38:28 +00:00
Fix empty projection handling
This commit is contained in:
parent
dccf9dd8f8
commit
0146ded4f4
@ -353,9 +353,12 @@ class GetMixin(PropsMixin):
|
|||||||
cls, projection: Sequence[str]
|
cls, projection: Sequence[str]
|
||||||
) -> Tuple[Collection[str], Collection[str]]:
|
) -> Tuple[Collection[str], Collection[str]]:
|
||||||
"""Return include and exclude lists based on passed projection and class definition"""
|
"""Return include and exclude lists based on passed projection and class definition"""
|
||||||
|
if projection:
|
||||||
include, exclude = partition(
|
include, exclude = partition(
|
||||||
projection, key=lambda x: x[0] != ProjectionHelper.exclusion_prefix,
|
projection, key=lambda x: x[0] != ProjectionHelper.exclusion_prefix,
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
include, exclude = [], []
|
||||||
exclude = {x.lstrip(ProjectionHelper.exclusion_prefix) for x in exclude}
|
exclude = {x.lstrip(ProjectionHelper.exclusion_prefix) for x in exclude}
|
||||||
return include, set(cls.get_exclude_fields()).union(exclude).difference(include)
|
return include, set(cls.get_exclude_fields()).union(exclude).difference(include)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user