Skip to content

Commit 883d9bd

Browse files
committed
Whoops, missed one
1 parent a690545 commit 883d9bd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

app/services/mongodb/MongoDBExtractorService.scala

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,11 @@ class MongoDBExtractorService extends ExtractorService {
248248
var results = List[ExtractorsLabel]()
249249
ExtractorInfoDAO.findOne(MongoDBObject("name"->extractorName)) match {
250250
case Some(info) => {
251-
val assignments = LabelAssignmentDAO.find(MongoDBObject("extractorId"->info.id)).toList
252-
for(assignment <- assignments) {
253-
ExtractorsLabelDAO.findOne(MongoDBObject("_id" -> assignment.labelId.stringify)) match {
254-
case Some(label) => {
255-
results = results.::(label)
256-
}
251+
ExtractorsLabelDAO.findAll().foreach(label => {
252+
if (label.extractors.contains(extractorName)) {
253+
results = results ++ List[ExtractorsLabel](label)
257254
}
258-
}
255+
})
259256
}
260257
}
261258
results

0 commit comments

Comments
 (0)