fix: add validation for log_file settings field (#4050)

fix: add validation for log_file field
This commit is contained in:
Ítalo Johnny 2024-10-07 17:54:06 -03:00 committed by GitHub
commit f9b014f5f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,6 +188,13 @@ class Settings(BaseSettings):
logger.debug(f"Setting user agent to {value}")
return value
@field_validator("log_file", mode="before")
@classmethod
def set_log_file(cls, value):
if isinstance(value, Path):
value = str(value)
return value
@field_validator("config_dir", mode="before")
@classmethod
def set_langflow_dir(cls, value):