#29578: Django 2.1b and 2.1rc1 put thousand separator in _selected_action field
containing id
-------------------------------------------+------------------------
Reporter: Sassan Haradji | Owner: nobody
Type: Bug | Status: new
Component: contrib.admin | Version: 2.1
Severity: Release blocker | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
In django 2.1b and 2.1rc1 when I select an item with id 1600 in item list
in django admin and try to delete the item, when I confirm the deletion
django raises this error:
{{{
...
File "/opt/escape/lib/python3.5/site-
packages/django/contrib/admin/sites.py", line 223, in inner
return view(request, *args, **kwargs)
File "/opt/escape/lib/python3.5/site-
packages/django/utils/decorators.py", line 45, in _wrapper
return bound_method(*args, **kwargs)
File "/opt/escape/lib/python3.5/site-
packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/opt/escape/lib/python3.5/site-
packages/django/contrib/admin/options.py", line 1727, in changelist_view
response = self.response_action(request,
queryset=cl.get_queryset(request))
File "/opt/escape/lib/python3.5/site-
packages/django/contrib/admin/options.py", line 1409, in response_action
queryset = queryset.filter(pk__in=selected)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/query.py", line 841, in filter
return self._filter_or_exclude(False, *args, **kwargs)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/query.py", line 859, in _filter_or_exclude
clone.query.add_q(Q(*args, **kwargs))
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/sql/query.py", line 1263, in add_q
clause, _ = self._add_q(q_object, self.used_aliases)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/sql/query.py", line 1287, in _add_q
split_subq=split_subq,
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/sql/query.py", line 1225, in build_filter
condition = self.build_lookup(lookups, col, value)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/sql/query.py", line 1096, in build_lookup
lookup = lookup_class(lhs, rhs)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/lookups.py", line 20, in __init__
self.rhs = self.get_prep_lookup()
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/lookups.py", line 210, in get_prep_lookup
rhs_value = self.lhs.output_field.get_prep_value(rhs_value)
File "/opt/escape/lib/python3.5/site-
packages/django/db/models/fields/__init__.py", line 965, in get_prep_value
return int(value)
ValueError: invalid literal for int() with base 10: '1٫600'
}}}
The character `٫` is my persian thousand separator.
--
Ticket URL: <https://code.djangoproject.com/ticket/29578>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.516901076a6486cb764816d35e56ef98%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.