Skip to content

Commit

Permalink
fix(api): limit board_name length to 300 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary Hipp authored and psychedelicious committed Jan 5, 2025
1 parent 868e06e commit 7d6c443
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion invokeai/app/api/routers/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DeleteBoardResult(BaseModel):
response_model=BoardDTO,
)
async def create_board(
board_name: str = Query(description="The name of the board to create"),
board_name: str = Query(description="The name of the board to create", max_length=300),
is_private: bool = Query(default=False, description="Whether the board is private"),
) -> BoardDTO:
"""Creates a board"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def deserialize_board_record(board_dict: dict) -> BoardRecord:


class BoardChanges(BaseModel, extra="forbid"):
board_name: Optional[str] = Field(default=None, description="The board's new name.")
board_name: Optional[str] = Field(default=None, description="The board's new name.", max_length=300)
cover_image_name: Optional[str] = Field(default=None, description="The name of the board's new cover image.")
archived: Optional[bool] = Field(default=None, description="Whether or not the board is archived")

Expand Down

0 comments on commit 7d6c443

Please sign in to comment.