Improve error messages in loaddata
|Reported by:||Ariel <ingenieroariel a..t gmail d..o..t com>||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
When trying to load some fixtures I encountered a
"Problem installing fixture 'mydata.json': duplicate key violates unique constraint "unique_for_data".
I know what the problem is, but I don't know where to start looking. A best approach could be:
"Problem installing fixture 'mydata.json' (object: 27): duplicate key violates unique constraint "unique_for_data".
On django/core/managment/commands/loaddata.py - line 103
The number of loaded objects is already stored on count so it would only be a matter of adding it to the error string.
Change History (7)
comment:1 Changed 7 years ago by Simon Greenhill <dev@…>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Summary changed from Object number on loaddata errors to Improve error messages in loaddata
- Triage Stage changed from Unreviewed to Accepted