Ticket #17544: ticket17544.diff

File ticket17544.diff, 1.1 KB (added by Jerzy Ludwichowski, 13 years ago)

Patch and regression test for #17544

  • tests/regressiontests/localflavor/pl/tests.py

     
    429429        }
    430430        invalid = {
    431431            '43-343-234-323': error_format,
    432             '64-62-414-124': error_format,
     432            '64-62-414-124': error_format,
    433433            '646-241-41-23': error_checksum,
     434            '1112027170': error_checksum,
    434435        }
    435436        self.assertFieldOutput(PLNIPField, valid, invalid)
    436437
  • django/contrib/localflavor/pl/forms.py

     
    155155            result += int(number[i]) * multiple_table[i]
    156156
    157157        result %= 11
    158         if result == int(number[-1]):
     158        if result != 10 and result == int(number[-1]):
    159159            return True
    160160        else:
    161161            return False
Back to Top