mirror of
https://github.com/clearml/clearml-server
synced 2025-01-31 19:06:55 +00:00
Fix missing custom metric values turn up first in sorting
This commit is contained in:
parent
b67aa05d6f
commit
ba77ff11e9
@ -695,14 +695,13 @@ class GetMixin(PropsMixin):
|
|||||||
mongo_field = first(
|
mongo_field = first(
|
||||||
v for k, v in cls.get_all_fields_with_instance() if k == mongo_field_name
|
v for k, v in cls.get_all_fields_with_instance() if k == mongo_field_name
|
||||||
)
|
)
|
||||||
if not mongo_field:
|
|
||||||
return
|
|
||||||
|
|
||||||
params = {}
|
|
||||||
if isinstance(mongo_field, ListField):
|
if isinstance(mongo_field, ListField):
|
||||||
params["is_list"] = True
|
params = {"is_list": True}
|
||||||
elif isinstance(mongo_field, StringField):
|
elif isinstance(mongo_field, StringField):
|
||||||
params["empty_value"] = ""
|
params = {"empty_value": ""}
|
||||||
|
else:
|
||||||
|
params = {}
|
||||||
non_empty = query & field_exists(mongo_field_name, **params)
|
non_empty = query & field_exists(mongo_field_name, **params)
|
||||||
empty = query & field_does_not_exist(mongo_field_name, **params)
|
empty = query & field_does_not_exist(mongo_field_name, **params)
|
||||||
return non_empty, empty
|
return non_empty, empty
|
||||||
|
Loading…
Reference in New Issue
Block a user