#36217: post_save signal is not called when LogEntry has Deletion action
-------------------------------------+-------------------------------------
     Reporter:  smiling-watermelon   |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  contrib.admin        |                  Version:  5.1
     Severity:  Release blocker      |               Resolution:
     Keywords:  LogEntry Signals     |             Triage Stage:  Accepted
  post_save                          |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Antoliny):

 Replying to [comment:1 Sarah Boyce]:
 > Thank you for the ticket!
 >
 > I think this is a consequence of
 40b3975e7d3e1464a733c69171ad7d38f8814280 (#34462), as we now use
 `bulk_create` which doesn't send a `post_save` signal
 ([https://docs.djangoproject.com/en/5.1/ref/models/querysets/#bulk-create
 see bulk_create docs]).
 >
 > The `single_object` kwarg, which decides to use `.save()` (and send
 signals), is used for `log_addition` etc but never for `log_deletions`
 (even if this is only one object). I believe this is an inconsistency of
 behavior we might want to clean up.
 >
 > I also think that we perhaps should/could document that these signals
 are no longer sent as part of the backwards incompatible changes of Django
 5.1 (with maybe an alternative suggestion).
 >
 > Note that it wasn't clear to me why we can't remove `single_object`
 kwarg entirely (I'm likely missing something):


 So, does that mean that from now on, `bulk_create` will always be used
 regardless of the number of objects being added or changed, and signals
 will never be triggered?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36217#comment:2>
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/010701954bbae2b6-3a66ee8b-6755-457e-b23d-e401b6315685-000000%40eu-central-1.amazonses.com.

Reply via email to