-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.10, 2.0.1
-
Component/s: None
I just found a strange behaviour with ObjectId and 12 car strings. The documentation about ObjectId says it take a valid ObjectId (12 byte binary or 24 character hex string) but ObjectId also accept 12 car string which is not a byte binary representation. As example:
>>> ObjectId('9'*12)
ObjectId('393939393939393939393939')
I expect an error as '9'*12 is not a valid byte binary representation.
I don't think it's a desirable behaviour, maybe it's juste the doc which need a little update but it's not clear.
If someone could tell me if it's a bug or a documentation outdated, thanks.