Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup committed Jul 21, 2023
1 parent 5d30c49 commit 34bdbbd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions internal/handlers/common/aggregations/stages/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ func newGroup(stage *types.Document) (aggregations.Stage, error) {

if field == "_id" {
if doc, ok := v.(*types.Document); ok {
if !operators.IsOperator(doc) {
if err = validateExpression("$group", doc); err != nil {
return nil, err
if err = validateExpression("$group", doc); err != nil {
if !operators.IsOperator(doc) {
continue

}
return nil, err
}
}
groupKey = v
Expand Down

0 comments on commit 34bdbbd

Please sign in to comment.