#16619 closed Bug (needsinfo)
Unable to delete IDs > 999 in contrib.admin with THOUSAND_SEPERATOR=True
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | contrib.admin | Version: | 1.2 |
Severity: | Normal | Keywords: | admin, THOUSAND_SEPERATOR, delete |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
While cleaning up some objects from my tests I noticed that I cannot delete objects with a PK/ID over 999 when THOUSAND_SEPERATOR=True is set. For example, given an object with PK 18240, this is turned into 18.240 when rendered on the admin site. This, in turn, means it is not possible to turn it back into an int.
The exact error message in my case is below, the traceback is posted on dpaste: http://dpaste.com/hold/592018/
ValueError at /admin/companies/company/ invalid literal for int() with base 10: '18.240'
Steps to reproduce:
- Start a Django project with an application
- Create a (simple) model
- Add >1000 objects of the model in 2
- Add the admin app to your URLs
- Create an admin for your model
- Log in to the admin
- Try deleting a object with id > 1000
This was noticed under Django 1.2.5
Change History (3)
comment:1 by , 13 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
I indeed made a typo there. Also, this seems to be unreproducable under Django 1.3. Looks like it was already fixed then.
I think there's a typo in the description: the setting is
USE_THOUSAND_SEPARATOR = True
.i can't reproduce this under Django 1.3; if you can, please provide more details and re-open the ticket.
Note that this isn't a security problem, so it won't be fixed in 1.2.x, and it isn't critical, so it won't be fixed in 1.3.x either. But if the bug still exists, we want to fix it in 1.4. See the backport policy described at https://docs.djangoproject.com/en/dev/internals/release-process/#supported-versions for more information.