Django

Code

Ticket #8229 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

Spanish ID card checksum validation fails on a specific case

Reported by: garcia_marc Assigned to: garcia_marc
Milestone: 1.0 Component: django.contrib.localflavor
Version: SVN Keywords: es spanish
Cc: mgarcia@yaco.es Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

The Spanish localflavor has a form field that validates a Spanish ID card number. The function calculates the algorithm based on a module 10 checksum. There is a specific case, when the result of the checksum is 0, that the function raises a "string index out of range" error. A simple transformation has to be applied on this case.

Attachments

8229.diff (1.9 kB) - added by garcia_marc on 08/11/08 10:25:55.
Fix for the issue, including a regression test for the failing case

Change History

08/11/08 10:25:55 changed by garcia_marc

  • attachment 8229.diff added.

Fix for the issue, including a regression test for the failing case

08/12/08 13:25:59 changed by jacob

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

08/16/08 02:00:31 changed by russellm

  • status changed from new to closed.
  • resolution set to fixed.

(In [8405]) Fixed #8229: Added handling for a special case in the validation of Spanish ID numbers. Thanks to Marc Garcia for the patch.


Add/Change #8229 (Spanish ID card checksum validation fails on a specific case)




Change Properties
Action