mirror of
https://github.com/django/django.git
synced 2025-06-07 04:29:12 +00:00
Removed a stray tab in django.contrib.localflavor.fi.forms
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
03d3d9f923
commit
bebf06611f
@ -35,13 +35,11 @@ class FISocialSecurityNumber(Field):
|
|||||||
(\d{2}))
|
(\d{2}))
|
||||||
[A+-]
|
[A+-]
|
||||||
(?P<serial>(\d{3}))
|
(?P<serial>(\d{3}))
|
||||||
(?P<chechsum>[%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.'))
|
||||||
checksum = int(result.groupdict()['date'] + result.groupdict()['serial'])
|
gd = match.groupdict()
|
||||||
|
checksum = int(gd['date'] + gd['serial'])
|
||||||
if checkmarks[checksum % len(checkmarks)] == result.groupdict()['chechsum'].upper():
|
if checkmarks[checksum % len(checkmarks)] == gd['checksum'].upper():
|
||||||
return u'%s' % value.upper()
|
return u'%s' % value.upper()
|
||||||
|
|
||||||
raise ValidationError(gettext(u'Enter a valid Finnish social security number.'))
|
raise ValidationError(gettext(u'Enter a valid Finnish social security number.'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user