mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Refs #23919 -- Removed re.U and re.UNICODE (default on Python 3).
This commit is contained in:
committed by
Tim Graham
parent
990ce6386c
commit
c22212220a
@@ -522,7 +522,7 @@ class RegexField(CharField):
|
||||
|
||||
def _set_regex(self, regex):
|
||||
if isinstance(regex, str):
|
||||
regex = re.compile(regex, re.UNICODE)
|
||||
regex = re.compile(regex)
|
||||
self._regex = regex
|
||||
if hasattr(self, '_regex_validator') and self._regex_validator in self.validators:
|
||||
self.validators.remove(self._regex_validator)
|
||||
|
||||
Reference in New Issue
Block a user