Skip to content

Commit b9efd79

Browse files
fix validator
1 parent 27e40cb commit b9efd79

File tree

1 file changed

+4
-5
lines changed
  • services/autoscaling/src/simcore_service_autoscaling/core

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,14 @@ def _validate_poll_interval_in_s(cls, v):
318318
return v
319319

320320
@model_validator(mode="after")
321-
@classmethod
322-
def exclude_both_dynamic_computational_mode(cls, values):
321+
def exclude_both_dynamic_computational_mode(self, v):
323322
if (
324-
values.get("AUTOSCALING_DASK") is not None
325-
and values.get("AUTOSCALING_NODES_MONITORING") is not None
323+
v.AUTOSCALING_DASK is not None
324+
and v.AUTOSCALING_NODES_MONITORING is not None
326325
):
327326
msg = "Autoscaling cannot be set to monitor both computational and dynamic services (both AUTOSCALING_DASK and AUTOSCALING_NODES_MONITORING are currently set!)"
328327
raise ValueError(msg)
329-
return values
328+
return v
330329

331330

332331
def get_application_settings(app: FastAPI) -> ApplicationSettings:

0 commit comments

Comments
 (0)