Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#15175 closed (fixed)

bug when validate chilean national identification number

Reported by: rvimer Owned by: ersame
Component: contrib.localflavor Version: dev
Severity: Keywords: localflavor
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Bug when validate chilean national identification number with verifier digit lower case ('k').
Steps to reproduce the bug

>>> from django.contrib.localflavor.cl.forms import CLRutField
>>> rut = CLRutField()
>>> rut.clean('13449333-k')
Traceback (most recent call last):
 File "<console>", line 1, in <module>
 File "/home/rene/backup/programFiles/django/trunk/django/contrib/localflavor/cl/forms.py", line 56, in clean
   raise ValidationError(self.error_messages['checksum'])
ValidationError: [u'The Chilean RUT is not valid.']
>>> rut.clean('13449333-K')
u'13.449.333-K'
>>>

Attachments (3)

form.patch (202 bytes ) - added by rvimer 13 years ago.
Patch form.py
localflavour_cl_form.diff (1.0 KB ) - added by ersame 13 years ago.
localflavour_cl_form_2.diff (1020 bytes ) - added by Brandon M Height 13 years ago.

Download all attachments as: .zip

Change History (9)

by rvimer, 13 years ago

Attachment: form.patch added

Patch form.py

comment:1 by Russell Keith-Magee, 13 years ago

Needs tests: set
Patch needs improvement: set
Triage Stage: UnreviewedAccepted

by ersame, 13 years ago

Attachment: localflavour_cl_form.diff added

comment:2 by ersame, 13 years ago

Needs tests: unset
Owner: changed from nobody to ersame
Patch needs improvement: unset
Status: newassigned

Hi,

This is my first patch and my hello to django developper.

It's an easy ticket and I would like to know if I have done it well.

Regards.

comment:3 by Russell Keith-Magee, 13 years ago

Triage Stage: AcceptedReady for checkin

by Brandon M Height, 13 years ago

Attachment: localflavour_cl_form_2.diff added

comment:4 by Brandon M Height, 13 years ago

Modified ersames' patch. I didn't really see the need for the additional line declaring 'verifier' as a variable.

comment:5 by Russell Keith-Magee, 13 years ago

Resolution: fixed
Status: assignedclosed

In [15450]:

Fixed #15175 -- Ensured that Chliean RUT checksum letters aren't case sensitive. Thanks to rvimer for the report, and to ersame for the patch.

H: Enter commit message. Lines beginning with 'HG:' are removed.

comment:6 by Russell Keith-Magee, 13 years ago

In [15454]:

[1.2.X] Fixed #15175 -- Ensured that Chliean RUT checksum letters aren't case sensitive. Thanks to rvimer for the report, and to ersame for the patch.

H: Enter commit message. Lines beginning with 'HG:' are removed.

Backport of r15450 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top