#33579: Raise a specialized exception when Model.save(update_fields) does not
affect any rows
-------------------------------------+-------------------------------------
     Reporter:  Simon Charette       |                    Owner:  Simon
                                     |  Charette
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  4.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * resolution:   => fixed
 * status:  assigned => closed

Comment:

 In [changeset:"ab148c02cedbac492f29930dcd5346e1af052635" ab148c0]:
 {{{#!CommitTicketReference repository=""
 revision="ab148c02cedbac492f29930dcd5346e1af052635"
 Fixed #33579 -- Specialized exception raised on forced update failures.

 Raising DatabaseError directly made it harder than it should to
 differentiate between IntegrityError when a forced update resulted in no
 affected rows.

 Introducing a specialized exception allows for callers to more easily
 silence, log, or turn them update failures into user facing exceptions
 (e.g. 404s).

 Thanks Mariusz for the review.
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/33579#comment:18>
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019581d0f500-5db2cd8f-bc9e-4908-a3cc-0305cd1a76c4-000000%40eu-central-1.amazonses.com.

Reply via email to