mirror of
https://github.com/clearml/clearml-server
synced 2025-04-18 21:24:45 +00:00
Support datetime ranges in field queries
This commit is contained in:
parent
9c118d14e0
commit
7772f47773
@ -368,6 +368,15 @@ class GetMixin(PropsMixin):
|
||||
if data is not None:
|
||||
if not isinstance(data, list):
|
||||
data = [data]
|
||||
# date time fields also support simplified range queries. Check if this is the case
|
||||
if len(data) == 2 and not any(
|
||||
d.startswith(mod)
|
||||
for d in data
|
||||
if d is not None
|
||||
for mod in ACCESS_MODIFIER
|
||||
):
|
||||
query &= cls.get_range_field_query(field, data)
|
||||
else:
|
||||
for d in data: # type: str
|
||||
m = ACCESS_REGEX.match(d)
|
||||
if not m:
|
||||
|
Loading…
Reference in New Issue
Block a user