Opened 7 years ago
Last modified 5 years ago
#28393 closed Cleanup/optimization
Make debugging of invalid values assignments to model fields easier — at Initial Version
Reported by: | Diederik van der Boor | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When a large model is updated and saved with invalid values,
Django produces a traceback deep within the ORM, with no clue
which field assignment caused the error.
Developers are faced with:
"TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple'"
This change (PR included) displays the field name which makes spotting errors a lot easier.
Note:
See TracTickets
for help on using tickets.