From ea45229477c398eb2de7f6f513d7bbd3de6ec9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Wed, 27 Oct 2021 16:52:52 +0200 Subject: [PATCH] Repair regexes --- scipost_django/common/converters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scipost_django/common/converters.py b/scipost_django/common/converters.py index 5dddfd086..296286fc4 100644 --- a/scipost_django/common/converters.py +++ b/scipost_django/common/converters.py @@ -20,7 +20,7 @@ class FourDigitYearConverter: class TwoDigitMonthConverter: - regex = '(0[1-9]{1})|(1[1-2]{1})' + regex = '0[1-9]|1[0-2]' def to_python(self, value): return int(value) @@ -30,7 +30,7 @@ class TwoDigitMonthConverter: class TwoDigitDayConverter: - regex = '([0-2]{1}[1-9])|30|31' + regex = '0[1-9]|[1-2][0-9]|3[0-1]' def to_python(self, value): return int(value) -- GitLab