mirror of https://github.com/django/django.git
Fixed a typo from [4968].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bebf06611f
commit
c80c3922b3
|
@ -38,7 +38,7 @@ class FISocialSecurityNumber(Field):
|
||||||
(?P<checksum>[%s])$""" % checkmarks, value, re.VERBOSE | re.IGNORECASE)
|
(?P<checksum>[%s])$""" % checkmarks, value, re.VERBOSE | re.IGNORECASE)
|
||||||
if not result:
|
if not result:
|
||||||
raise ValidationError(gettext(u'Enter a valid Finnish social security number.'))
|
raise ValidationError(gettext(u'Enter a valid Finnish social security number.'))
|
||||||
gd = match.groupdict()
|
gd = result.groupdict()
|
||||||
checksum = int(gd['date'] + gd['serial'])
|
checksum = int(gd['date'] + gd['serial'])
|
||||||
if checkmarks[checksum % len(checkmarks)] == gd['checksum'].upper():
|
if checkmarks[checksum % len(checkmarks)] == gd['checksum'].upper():
|
||||||
return u'%s' % value.upper()
|
return u'%s' % value.upper()
|
||||||
|
|
Loading…
Reference in New Issue