fabiocaccamo / python-codicefiscale

:it: :credit_card: italian fiscal codes encoding, decoding and validation - codifica, decodifica e validazione del Codice Fiscale italiano.
MIT License
71 stars 24 forks source link

Wrong validity check after 0.5.0 version #123

Closed m-berto closed 11 months ago

m-berto commented 11 months ago

Python version 3.10

Package version 0.8.1

Current behavior (bug description) Some valid fiscal codes validated in versions since 0.5.0 are not validated in later versions. I cant' provide a real fiscal code to test (for privacy reasons) but i can provide some other details for the debug:

Birth place: MONTECHIARO D’ACQUI Province: AL Birth date: 04/03/1940 Sex: M

Birth place: PRIERO Province: CN Birth date: 18/01/1941 Sex: F

Upvote & Fund

Fund with Polar

fabiocaccamo commented 11 months ago

@m-berto thank you for reporting this.

The cause of this issue has been discussed in #113, unfortunately the only thing that can be done is to patch the municipalities data every time someone reports some "invalid" but valid fiscal codes.

fabiocaccamo commented 11 months ago

Now I fixed the two municipalities you reported (you can upgrade to 0.8.2), but I'm sure there are tens of municipalities having the same problem.