#28393: Add a helpful exception for invalid values passed to AutoField/FloatField/IntegerField. -------------------------------------+------------------------------------- Reporter: Diederik van der | Owner: Nick Pope Boor | Type: | Status: assigned Cleanup/optimization | Component: Database layer | Version: master (models, ORM) | Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Nick Pope):
* status: new => assigned * needs_better_patch: 1 => 0 * version: 1.11 => master * owner: nobody => Nick Pope Old 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. > > Pull request: https://github.com/django/django/pull/8760 New 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 displays the field name which makes spotting errors a lot easier. -- Comment: New [https://github.com/django/django/pull/11622 PR]. -- Ticket URL: <https://code.djangoproject.com/ticket/28393#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/064.0e8bd5f1534400109fde13cf37405de9%40djangoproject.com.