Skip to content

Commit 9af6a46

Browse files
committed
Update MongoDB query
1 parent b7c579c commit 9af6a46

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
use('xforge')
1+
use("xforge");
22

33
// Query to find what project is using a project as a source (and therefore preventing the specified project from being
44
// deleted). This is a re-implementation of the logic in SFProjectService.IsSourceProject
55

6-
const shortName = '';
6+
const shortName = "";
77

8-
const id = db.sf_projects.findOne({ shortName })._id
8+
const id = db.sf_projects.findOne({ shortName })._id;
99

1010
db.sf_projects.find({
11-
$or: [{
12-
'translateConfig.source.projectRef': id
13-
}, {
14-
'translateConfig.draftConfig.alternateSource.projectRef': id
15-
}, {
16-
'translateConfig.draftConfig.alternateTrainingSource.projectRef': id
17-
}, {
18-
'translateConfig.draftConfig.additionalTrainingSource.projectRef': id
19-
}]
20-
})
11+
$or: [
12+
{
13+
"translateConfig.source.projectRef": id
14+
},
15+
{
16+
"translateConfig.draftConfig.draftingSources.projectRef": id
17+
},
18+
{
19+
"translateConfig.draftConfig.trainingSources.projectRef": id
20+
}
21+
]
22+
});

0 commit comments

Comments
 (0)