fix dbreformat
This commit is contained in:
parent
912cddf776
commit
8bf252ed87
1 changed files with 17 additions and 13 deletions
|
@ -87,22 +87,26 @@ Project.find({})
|
|||
.exec((err, projects) => {
|
||||
projects.forEach((project, projectIndex) => {
|
||||
project.files.forEach((file) => {
|
||||
// if (file.isSelected === true || file.isSelected === false) {
|
||||
// file.isSelectedFile = file.isSelected;
|
||||
// delete file.isSelected;
|
||||
// }
|
||||
console.log('project', projectIndex);
|
||||
if (file.isSelected) {
|
||||
console.log('is selected remains');
|
||||
}
|
||||
|
||||
if (file.isSelctedFile) {
|
||||
console.log('changed to isSelected file');
|
||||
}
|
||||
});
|
||||
// project.save((err, savedProject) => {
|
||||
// console.log('project', projectIndex, 'is saved.');
|
||||
if (file.isSelected === true || file.isSelected === false) {
|
||||
file.isSelectedFile = file.isSelected;
|
||||
delete file.isSelected;
|
||||
console.log(file);
|
||||
// file.save((err, savedFile) => {
|
||||
// console.log('file saved');
|
||||
// });
|
||||
}
|
||||
// console.log('project', projectIndex);
|
||||
// if (file.isSelected) {
|
||||
// console.log('is selected remains');
|
||||
// }
|
||||
|
||||
// if (file.isSelctedFile) {
|
||||
// console.log('changed to isSelected file');
|
||||
// }
|
||||
});
|
||||
project.save((err, savedProject) => {
|
||||
console.log('project', projectIndex, 'is saved.');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue