MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / _check_default_secret

Method _check_default_secret

backend/src/core/config.py:78–87  ·  view source on GitHub ↗
(self, var_name: str, value: str | None)

Source from the content-addressed store, hash-verified

76 return bool(self.AI_API_KEY and self.AI_MODEL)
77
78 def _check_default_secret(self, var_name: str, value: str | None) -> None:
79 if value == "changethis":
80 message = (
81 f'The value of {var_name} is "changethis", '
82 "for security, please change it, at least for deployments."
83 )
84 if self.ENVIRONMENT == "local":
85 warnings.warn(message, stacklevel=1)
86 else:
87 raise ValueError(message)
88
89 @model_validator(mode="after")
90 def _enforce_non_default_secrets(self) -> Self:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected