mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
parent
97919abdde
commit
2770def8f1
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,8 @@ checkDuplicateAttributes = function checkDuplicateAttributes(data, comparedValue
|
||||||
|
|
||||||
sanitize = function sanitize(data) {
|
sanitize = function sanitize(data) {
|
||||||
var allProblems = {},
|
var allProblems = {},
|
||||||
tableNames = _.sortBy(_.keys(data.data), function (tableName) {
|
tablesInData = _.keys(data.data),
|
||||||
|
tableNames = _.sortBy(_.keys(tables), function (tableName) {
|
||||||
// We want to guarantee posts and tags go first
|
// We want to guarantee posts and tags go first
|
||||||
if (tableName === 'posts') {
|
if (tableName === 'posts') {
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -89,6 +90,8 @@ sanitize = function sanitize(data) {
|
||||||
return 3;
|
return 3;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
tableNames = _.intersection(tableNames, tablesInData);
|
||||||
|
|
||||||
_.each(tableNames, function (tableName) {
|
_.each(tableNames, function (tableName) {
|
||||||
// Sanitize the table data for duplicates and valid uuid and created_at values
|
// Sanitize the table data for duplicates and valid uuid and created_at values
|
||||||
var sanitizedTableData = _.transform(data.data[tableName], function (memo, importValues) {
|
var sanitizedTableData = _.transform(data.data[tableName], function (memo, importValues) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue