Commit e076c1da authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root

Re match direct

parent bfd79d44
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment