diff options
| author | Moayad Mardini <moayad.m@gmail.com> | 2014-06-10 21:28:32 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-10 16:04:43 -0400 |
| commit | 868ff4e37c1e4cfaf7283496c24f6e711ad66005 (patch) | |
| tree | 12313f4aad04c89f16fc5e53bf154d4b0f146a54 /django | |
| parent | f97c53c0989336563c535c9737dff197b403054d (diff) | |
Fixed #22798 -- `pluralize()` now adds plural_suffix for any `1 < d < 2`
Thanks Odd_Bloke for the report.
Diffstat (limited to 'django')
| -rw-r--r-- | django/template/defaultfilters.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py index e6a0c619dc..c5839197df 100644 --- a/django/template/defaultfilters.py +++ b/django/template/defaultfilters.py @@ -934,7 +934,7 @@ def pluralize(value, arg='s'): singular_suffix, plural_suffix = bits[:2] try: - if int(value) != 1: + if float(value) != 1: return plural_suffix except ValueError: # Invalid string that's not a number. pass |
