File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments