Skip to content

Commit

Permalink
Merge pull request #90 from UpstreamDataInc/mm/fix-software-deletion
Browse files Browse the repository at this point in the history
Fix software deletion from UI
  • Loading branch information
b-rowan authored Aug 27, 2024
2 parents ec89dcc + 500876c commit 118d176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions goosebit/api/v1/software/requests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pydantic import BaseModel
from pydantic import RootModel


class SoftwareDeleteRequest(BaseModel):
files: list[int]
class SoftwareDeleteRequest(RootModel[list[int]]):
pass
2 changes: 1 addition & 1 deletion goosebit/api/v1/software/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async def software_get(_: Request) -> SoftwareResponse:
)
async def software_delete(_: Request, config: SoftwareDeleteRequest) -> StatusResponse:
success = False
for f_id in config.files:
for f_id in config.root:
software = await Software.get_or_none(id=f_id)

if software is None:
Expand Down

0 comments on commit 118d176

Please sign in to comment.