Skip to content

Commit

Permalink
Fix "Export Everything" to properly constrain types (elastic#21402)
Browse files Browse the repository at this point in the history
This fixes the "Export Everything" button on the Saved Objects Management screen so that the export properly constrains the saved object types returned.

Previously, this endpoint was incorrectly returning objects that were not requested (such as the `config` object). This behavior is exacerbated with [Spaces](elastic#18948) because the export button would incorrectly export the Space objects, which in turn do not make sense to import.
  • Loading branch information
legrego committed Jul 30, 2018
1 parent 45d754e commit 788b76f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function registerScrollForExportRoute(server) {
const savedObjectsClient = req.getSavedObjectsClient();
const objects = await findAll(savedObjectsClient, {
perPage: 1000,
typesToInclude: req.payload.typesToInclude
type: req.payload.typesToInclude
});
const response = objects.map(hit => {
const type = hit.type;
Expand Down

0 comments on commit 788b76f

Please sign in to comment.