Opened 7 years ago

Last modified 5 years ago

#28393 closed Cleanup/optimization

Make debugging of invalid values assignments to model fields easier — at Version 1

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 (last modified by Diederik van der Boor)

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.

Pull request: https://github.com/django/django/pull/8760

Change History (1)

comment:1 by Diederik van der Boor, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top