Skip to content

Commit 118d176

Browse files
authored
Merge pull request #90 from UpstreamDataInc/mm/fix-software-deletion
Fix software deletion from UI
2 parents ec89dcc + 500876c commit 118d176

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

goosebit/api/v1/software/requests.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from pydantic import BaseModel
1+
from pydantic import RootModel
22

33

4-
class SoftwareDeleteRequest(BaseModel):
5-
files: list[int]
4+
class SoftwareDeleteRequest(RootModel[list[int]]):
5+
pass

goosebit/api/v1/software/routes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ async def software_get(_: Request) -> SoftwareResponse:
2626
)
2727
async def software_delete(_: Request, config: SoftwareDeleteRequest) -> StatusResponse:
2828
success = False
29-
for f_id in config.files:
29+
for f_id in config.root:
3030
software = await Software.get_or_none(id=f_id)
3131

3232
if software is None:

0 commit comments

Comments
 (0)