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

 * cc: Mariusz Felisiak (added)

Comment:

 Replying to [comment:12 Simon Charette]:
 > Left some comments on the PR. It still needs tests tweaking, some code
 adjustments, and documentation about
 `django.core.exceptions.ObjectNotUpdated` and `NotUpdated`.

 TBH, this error is extremely annoying to me. It forces users to catch
 `DatabaseError` on every `save()` call when you process things
 asynchronously and don't really care if someone was deleted in the
 meantime. I'd vote to remove it totally 😉, but realistically we should
 raise `DoesNotExist` like on `save()` without `update_fields`.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/33579#comment:13>
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/0107019541ada6ba-64d6e444-c8a9-4b01-b330-b34a01a66c27-000000%40eu-central-1.amazonses.com.

Reply via email to