itpp-labs/sync-addons

OpenAPI: list index out of range

ifujis opened this issue · 0 comments

OpenAPI module:
Opening api/v1/{integration}/swagger.json results in Internal Server Error when Integration has a model with a selection field that has no options defined.

Cause:
controllers/pinguin.py
list index out of range exception at if isinstance(meta["selection"][0][0], int).

Possible fix:
Add a check if the meta["selection"] is not empty.