Skip to content

Commit

Permalink
fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
noisersup committed Jun 21, 2023
1 parent fcf1852 commit a798dd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion integration/aggregate_documents_compat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,6 @@ func TestAggregateCompatProject(t *testing.T) {
bson.D{{"$sort", bson.D{{"_id", -1}}}},
bson.D{{"$project", bson.D{{"_id", bson.D{{"v", "foo"}}}}}},
},
resultType: emptyResult,
},
"DocumentAndValue": {
pipeline: bson.A{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func ProjectDocument(doc, projection *types.Document, inclusion bool) (*types.Do
}

Check warning on line 259 in internal/handlers/common/aggregations/stages/projection/projection.go

View check run for this annotation

Codecov / codecov/patch

internal/handlers/common/aggregations/stages/projection/projection.go#L253-L259

Added lines #L253 - L259 were not covered by tests

projected.Set("_id", idValue)
set = true

break
}
Expand All @@ -273,6 +274,7 @@ func ProjectDocument(doc, projection *types.Document, inclusion bool) (*types.Do
return nil, err
}

set = true

Check warning on line 277 in internal/handlers/common/aggregations/stages/projection/projection.go

View check run for this annotation

Codecov / codecov/patch

internal/handlers/common/aggregations/stages/projection/projection.go#L277

Added line #L277 was not covered by tests
projected.Set("_id", value)

case *types.Array, string, types.Binary, types.ObjectID,
Expand Down

0 comments on commit a798dd4

Please sign in to comment.