Skip to content

Commit

Permalink
Fix "Export Everything" to properly constrain types (#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](#18948) because the export button would incorrectly export the Space objects, which in turn do not make sense to import.
  • Loading branch information
legrego authored Jul 30, 2018
1 parent a76b5d7 commit ea2e3b0
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 ea2e3b0

Please sign in to comment.