diff --git a/clearml/backend_api/services/v2_23/models.py b/clearml/backend_api/services/v2_23/models.py index ccdc36b6..99f6f6bc 100644 --- a/clearml/backend_api/services/v2_23/models.py +++ b/clearml/backend_api/services/v2_23/models.py @@ -2242,11 +2242,11 @@ class GetAllRequest(Request): }, "last_update": { "description": ( - "List of last_update constraint strings (utcformat, epoch) with an optional prefix " + "List of last_update constraint strings, or a single string (utcformat, epoch) with an optional prefix " "modifier (>, >=, <, <=)" ), "items": {"pattern": "^(>=|>|<=|<)?.*$", "type": "string"}, - "type": ["array", "null"], + "type": ["string", "array", "null"], }, "name": { "description": "Get only models whose name matches this pattern (python regular expression syntax)", @@ -2621,9 +2621,11 @@ class GetAllRequest(Request): self._property_last_update = None return - self.assert_isinstance(value, "last_update", (list, tuple)) + self.assert_isinstance(value, "last_update", (str, list, tuple)) + + if not isinstance(value, six.string_types): + self.assert_isinstance(value, "last_update", six.string_types, is_array=True) - self.assert_isinstance(value, "last_update", six.string_types, is_array=True) self._property_last_update = value @schema_property("_all_") diff --git a/clearml/backend_api/services/v2_23/tasks.py b/clearml/backend_api/services/v2_23/tasks.py index f14fc24f..74807cf8 100644 --- a/clearml/backend_api/services/v2_23/tasks.py +++ b/clearml/backend_api/services/v2_23/tasks.py @@ -8218,11 +8218,11 @@ class GetAllRequest(Request): }, "status_changed": { "description": ( - "List of status changed constraint strings (utcformat, epoch) with an optional prefix modifier " + "List of status changed constraint strings, or a single string (utcformat, epoch) with an optional prefix modifier " "(>, >=, <, <=)" ), "items": {"pattern": "^(>=|>|<=|<)?.*$", "type": "string"}, - "type": ["array", "null"], + "type": ["string", "array", "null"], }, "system_tags": { "description": "List of task system tags. Use '-' prefix to exclude system tags", @@ -8502,9 +8502,11 @@ class GetAllRequest(Request): self._property_status_changed = None return - self.assert_isinstance(value, "status_changed", (list, tuple)) + self.assert_isinstance(value, "status_changed", (str, list, tuple)) + + if not isinstance(value, six.string_types): + self.assert_isinstance(value, "status_changed", six.string_types, is_array=True) - self.assert_isinstance(value, "status_changed", six.string_types, is_array=True) self._property_status_changed = value @schema_property("search_text")