Skip to content

Commit f686120

Browse files
fix timedelta validation
1 parent 53c6c89 commit f686120

File tree

1 file changed

+7
-0
lines changed
  • services/autoscaling/src/simcore_service_autoscaling/core

1 file changed

+7
-0
lines changed

services/autoscaling/src/simcore_service_autoscaling/core/settings.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ def LOG_LEVEL(self): # noqa: N802
293293
@classmethod
294294
def valid_log_level(cls, value: str) -> str:
295295
return cls.validate_log_level(value)
296+
297+
@field_validator("AUTOSCALING_POLL_INTERVAL", mode="before")
298+
@classmethod
299+
def _validate_poll_interval_in_s(cls, v):
300+
if isinstance(v, str) and v.isnumeric():
301+
return int(v)
302+
return v
296303

297304
@model_validator(mode="after")
298305
@classmethod

0 commit comments

Comments
 (0)