diff --git a/services/inventory/http_routes.go b/services/inventory/http_routes.go index 806ad2525..77fae7335 100644 --- a/services/inventory/http_routes.go +++ b/services/inventory/http_routes.go @@ -1113,9 +1113,12 @@ func (h *HttpHandler) RunQueryByID(ctx echo.Context) error { if err := bindValidate(ctx, &req); err != nil { return echo.NewHTTPError(http.StatusBadRequest, err.Error()) } - if req.ID == "" || req.Type == "" { + if req.ID == "" { return echo.NewHTTPError(http.StatusBadRequest, "Runnable Type and ID should be provided") } + if req.Type == "" { + req.Type = "namedquery" + } newCtx, cancel := context.WithTimeout(ctx.Request().Context(), 30*time.Second) defer cancel()