Commit bc97480
committed
fix: ISSN checksum returns 11 instead of 0 when weighted sum is divisible by 11
The `_calculate_checksum` method in `InternationalStandardSerialNumber`
was missing a final `% 11`, causing it to return 11 (an invalid
two-digit value) instead of 0 when the weighted digit sum happened to
be exactly divisible by 11.
Fixes #238.1 parent 1d872d3 commit bc97480
2 files changed
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
0 commit comments