Skip to content

Commit

Permalink
Fix wiki picture upload route (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaamb authored Feb 2, 2025
1 parent aa94866 commit 80c879c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/ouranos/web_server/routes/services/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ async def upload_picture(
name=file.filename.split(".")[0],
values={
"content": content,
"extension": file.filename.split(".")[1],
},
)
return f"A new wiki picture was successfully uploaded."
Expand Down
2 changes: 1 addition & 1 deletion src/ouranos/web_server/validate/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ def parse_path(cls, value):

class WikiArticlePictureCreationPayload(BaseModel):
name: str
extension: str | None = None
extension: str
content: bytes
tags: list[str] = Field(default_factory=list, serialization_alias="tags_name")

0 comments on commit 80c879c

Please sign in to comment.