Skip to content

Commit

Permalink
Fixed exporting extra tables for endpoint db/backup
Browse files Browse the repository at this point in the history
refs #8719

- initial commit: 40c8eac
- we have forgotten that there is another endpoint which triggers an export (the backup endpoint)
- this endpoint needs to accept the new `include` query param as well (was missing)
  • Loading branch information
kirrg001 committed Aug 10, 2018
1 parent 1b5eae2 commit 1ce504b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/server/api/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ db = {
}

tasks = [
localUtils.convertOptions(exporter.EXCLUDED_TABLES, null, {forModel: false}),
backupDatabase,
jsonResponse
];
Expand Down
2 changes: 1 addition & 1 deletion core/server/data/export/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exportFileName = function exportFileName(options) {
return Promise.resolve(options.filename + '.json');
}

return models.Settings.findOne({key: 'title'}, _.merge({}, modelOptions, options)).then(function (result) {
return models.Settings.findOne({key: 'title'}, _.merge({}, modelOptions, _.pick(options, 'transacting'))).then(function (result) {
if (result) {
title = security.string.safe(result.get('value')) + '.';
}
Expand Down

0 comments on commit 1ce504b

Please sign in to comment.