update changelog with recent changes that were merged

This commit is contained in:
Bastien Gerard 2021-10-12 21:06:11 +02:00
parent 8c3e2b340b
commit 686b42c29b
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ Development
- EnumField improvements: now `choices` limits the values of an enum to allow
- Fix deepcopy of EmbeddedDocument #2202
- Fix error when using precision=0 with DecimalField #2535
- Add support for regex and whole word text search query #2568
Changes in 0.23.1
===========

View File

@ -162,10 +162,10 @@ class StringField(BaseField):
elif op == "regex":
regex = value
# escape unsafe characters which could lead to a re.error
if op == "regex":
value = re.compile(regex, flags)
else:
# escape unsafe characters which could lead to a re.error
value = re.escape(value)
value = re.compile(regex % value, flags)
return super().prepare_query_value(op, value)