Skip to content

Commit 5013fe1

Browse files
committed
fix: restore IDToBsonBinary fallback behavior in sdk/mpr
1 parent 419400b commit 5013fe1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sdk/mpr/utils.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ func BlobToUUID(data []byte) string {
2525
}
2626

2727
// IDToBsonBinary converts a UUID string to a BSON binary value.
28+
// For invalid or empty UUIDs (e.g. test placeholders), falls back to generating
29+
// a random ID to maintain backward compatibility with existing serialization paths.
30+
// For strict validation, use bsonutil.IDToBsonBinaryErr.
2831
func IDToBsonBinary(id string) primitive.Binary {
29-
return bsonutil.IDToBsonBinary(id)
32+
return idToBsonBinary(id)
3033
}
3134

3235
// BsonBinaryToID converts a BSON binary value to a UUID string.

0 commit comments

Comments
 (0)