Skip to content

Commit

Permalink
fix: validate params in GET /images/logos route
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 12, 2022
1 parent 24ed944 commit b265686
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion robotoff/app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,9 @@ def image_response(image: Image.Image, resp: falcon.Response) -> None:

class ImageLogoResource:
def on_get(self, req: falcon.Request, resp: falcon.Response):
logo_ids: list[str] = req.get_param_as_list("logo_ids", required=True)
logo_ids: list[str] = req.get_param_as_list(
"logo_ids", transform=int, required=True
)
logos = []
for logo in (
LogoAnnotation.select()
Expand Down

0 comments on commit b265686

Please sign in to comment.