Skip to content

Commit dbd7228

Browse files
authored
Merge pull request #2574 from bagerard/update_changelog_recent_merge
update changelog with recent changes that were merged
2 parents 8c3e2b3 + 686b42c commit dbd7228

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Development
1010
- EnumField improvements: now `choices` limits the values of an enum to allow
1111
- Fix deepcopy of EmbeddedDocument #2202
1212
- Fix error when using precision=0 with DecimalField #2535
13+
- Add support for regex and whole word text search query #2568
1314

1415
Changes in 0.23.1
1516
===========

mongoengine/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ def prepare_query_value(self, op, value):
162162
elif op == "regex":
163163
regex = value
164164

165-
# escape unsafe characters which could lead to a re.error
166165
if op == "regex":
167166
value = re.compile(regex, flags)
168167
else:
168+
# escape unsafe characters which could lead to a re.error
169169
value = re.escape(value)
170170
value = re.compile(regex % value, flags)
171171
return super().prepare_query_value(op, value)

0 commit comments

Comments
 (0)