#32728 closed Bug (duplicate)
Primary key column is duplicated in the admin changelist when it's in ModelAdmin.list_editable.
Reported by: | Greenbond | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 3.2 |
Severity: | Normal | Keywords: | primary_key, list_editable |
Cc: | Greenbond | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description (last modified by )
I found a suspicious bug in admin site.
Config ( Conditions )
- You have a primary_key =True field in your model.py
- Primary_key = True field is included in list_editable option in your admins.py
The primary_key = True field you set in the list_editable will be dupulicated in your admin site.
I created a public repository in github to test or check easily.
There is a screenshot for the suspicious bug and sample codings in the Readme on github.
Change History (4)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Cc: | added |
---|
comment:3 by , 3 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Summary: | Dupulicated column in admin site → Primary key column is duplicated in the admin changelist when it's in ModelAdmin.list_editable. |
Note:
See TracTickets
for help on using tickets.
Thanks for the report. Including primary keys in the
ModelAdmin.list_editable
will not work as you expect, see #2259. We could easily fix an issue with duplicated columns:however it won't fix the main issue described in #2259. IMO including primary keys in
ModelAdmin.list_editable
should not be allowed. Closing as a duplicate of #2259.