Skip to content

Commit f7d47bf

Browse files
author
Tzury Bar Yochay
committed
preventing a dot in key breaks applications
This shall be an optional config parameter, but having this constraint hard-coded, makes current apps which worked with previous versions without issue, break.
1 parent ac203ae commit f7d47bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bson/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def _element_to_bson(key, value, check_keys, uuid_subtype):
349349
if check_keys:
350350
if key.startswith("$"):
351351
raise InvalidDocument("key %r must not start with '$'" % key)
352-
if "." in key:
353-
raise InvalidDocument("key %r must not contain '.'" % key)
352+
# if "." in key:
353+
# raise InvalidDocument("key %r must not contain '.'" % key)
354354

355355
name = _make_c_string(key, True)
356356
if isinstance(value, float):

0 commit comments

Comments
 (0)