From e076c1da33f340c90081d9447da535108af7bfa0 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 28 Dec 2018 23:23:05 +0100 Subject: [PATCH] Re match direct --- users/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/models.py b/users/models.py index b8f79942..a0985675 100755 --- a/users/models.py +++ b/users/models.py @@ -1070,7 +1070,7 @@ class Adherent(User): """Validate from raw entry if is it a valid gpg fp""" if self.gpg_fingerprint: gpg_fingerprint = self.gpg_fingerprint.replace(' ', '').upper() - if not re.compile("^[0-9A-F]{40}$").match(gpg_fingerprint): + if not re.match("^[0-9A-F]{40}$", gpg_fingerprint): raise ValidationError(_("A gpg fingerprint must contain 40 hexadecimal carracters")) self.gpg_fingerprint = gpg_fingerprint