Skip to content

Commit

Permalink
Fix insights aggregation by opening
Browse files Browse the repository at this point in the history
  • Loading branch information
allanjoseph98 committed May 1, 2024
1 parent 75f56e9 commit 055a4a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/insight/src/main/AggregationPipeline.scala
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ final private class AggregationPipeline(store: InsightStorage)(using
$doc(F.provisional.$ne(true))
}
) -> {
sortDate ::: limitGames :: (metric.match
sortDate ::: limitGames :: ((metric.match
case M.MeanCpl =>
List(
projectForMove,
Expand Down Expand Up @@ -407,9 +407,9 @@ final private class AggregationPipeline(store: InsightStorage)(using
GroupFunction("$avg", $divide("$" + F.moves("v"), TimeVariance.intFactor))
) :::
List(includeSomeGameIds)
::: dimension.match
case D.OpeningVariation | D.OpeningFamily => List(sortNb, limit(12))
case _ => Nil
) ::: dimension.match
case D.OpeningVariation | D.OpeningFamily => List(sortNb, limit(12))
case _ => Nil
).flatten
}
pipeline

0 comments on commit 055a4a0

Please sign in to comment.