Changes between Initial Version and Version 1 of Ticket #29447


Ignore:
Timestamp:
May 26, 2018, 9:31:55 AM (6 years ago)
Author:
Jeremy Lainé
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29447 – Description

    initial v1  
    33https://github.com/django/django/blob/265506bbc347a6b3fcc6c66ab1a2417b3b7ea57a/django/db/models/fields/related_descriptors.py#L711
    44
    5 This looks like a bug, as passing bulk=True, clear=True results in the following behavior:
     5This looks like a bug, as passing bulk=False, clear=True results in the following behavior:
    66
    7 - clear() is invoked in "non-bulk" mode, triggering signals
    8 - add() is correctly invoked in "bulk" mode, no signals are not triggered
     7- clear() is invoked in "bulk" mode, not triggering signals
     8- add() is invoked in "non-bulk" mode, signals are triggered
     9
     10Admitedly, I'm not too sure why you would want to do this, but at the very least the docs should mention if this combination is unsupported.
    911
    1012I spotted this while reading the `related_descriptors.py` code to fix #29440.
Back to Top