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:
Malcolm Tredinnick 2007-04-09 06:16:44 +00:00
parent bebf06611f
commit c80c3922b3
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class FISocialSecurityNumber(Field):
(?P<checksum>[%s])$""" % checkmarks, value, re.VERBOSE | re.IGNORECASE)
if not result:
raise ValidationError(gettext(u'Enter a valid Finnish social security number.'))
gd = match.groupdict()
gd = result.groupdict()
checksum = int(gd['date'] + gd['serial'])
if checkmarks[checksum % len(checkmarks)] == gd['checksum'].upper():
return u'%s' % value.upper()