Skip to content

Commit

Permalink
Refs #576: removes unnecessary filter
Browse files Browse the repository at this point in the history
  • Loading branch information
janehmueller committed Oct 1, 2017
1 parent c72387d commit a243e45
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ object KompassDataLakeImport extends DataLakeImportImplementation[KompassEntity]
values: List[String],
strategies: Map[String, List[String]]
): List[String] = {
var normalized = KompassNormalizationStrategy(attribute)(values)
if(attribute == "gen_sectors") {
normalized = normalized.flatMap(x => strategies.getOrElse(x, List(x)))
}
normalized.filter(_.nonEmpty)
val normalized = KompassNormalizationStrategy(attribute)(values)
if(attribute == "gen_sectors") normalized.flatMap(x => strategies.getOrElse(x, List(x))) else normalized
}

override def translateToSubject(
Expand Down

0 comments on commit a243e45

Please sign in to comment.