Skip to content

Commit

Permalink
fix: add validation for log_file settings field (#4050)
Browse files Browse the repository at this point in the history
fix: add validation for log_file field
  • Loading branch information
italojohnny authored Oct 7, 2024
1 parent f7e58f9 commit f9b014f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/backend/base/langflow/services/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ def set_user_agent(cls, value):
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):
Expand Down

0 comments on commit f9b014f

Please sign in to comment.