Opened 12 years ago
Closed 12 years ago
#20509 closed Bug (fixed)
--pks option in dumpdata command raises exception
| Reported by: | Weipin Xia | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Management commands) | Version: | dev |
| Severity: | Release blocker | Keywords: | |
| Cc: | bmispelon@… | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Issuing dumpdata command with --pks option results in a AttributeError exception.
./manage.py dumpdata appname --pks 1 ... AttributeError: 'list' object has no attribute 'split'
Attachments (1)
Change History (6)
by , 12 years ago
| Attachment: | patch.diff added |
|---|
comment:1 by , 12 years ago
| Needs tests: | set |
|---|---|
| Patch needs improvement: | set |
| Severity: | Normal → Release blocker |
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 12 years ago
| Cc: | added |
|---|---|
| Patch needs improvement: | unset |
comment:3 by , 12 years ago
| Needs tests: | unset |
|---|
Added a test in this pull request: https://github.com/django/django/pull/1231
comment:4 by , 12 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Looks good.
The added test fails without the patch and passes when it's applied.
I'm marking this as RFC.
comment:5 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
The proposed patch just removes the (documented) ability to pass a comma-separated list of primary keys.
Here's my attempt at a better patch: https://github.com/django/django/pull/1227
I'm not too sure how to write a regression test for this though...