Opened 8 years ago

Last modified 8 years ago

#27380 new New feature

Add the 'raw' argument with the 'm2m_changed' signal

Reported by: Élie Bouttier Owned by: nobody
Component: Database layer (models, ORM) Version: 1.10
Severity: Normal Keywords:
Cc: direx Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no
Pull Requests:How to create a pull request

Description

The 'raw' argument is sent with pre_save and post_save signals in order to detect fixture loading and avoid un-needed operations in this case.
Unfortunatly, this argument is not sent with m2m_changed signal !
I find a work-around on stack-overflow for tests which consist in disconnecting the m2m_signal in the setUpClass.
However, this is not applicable for loaddata management command.

Please send the 'raw' argument with the m2m_changed signal, this is needed!

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To provide a patch by sending a pull request. Claim the ticket when you start working so that someone else doesn't duplicate effort. Before sending a pull request, review your work against the patch review checklist. Check the "Has patch" flag on the ticket after sending a pull request and include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (3)

comment:1 by Tim Graham, 8 years ago

This was also proposed in #17583 which was marked as a duplicate of #8399 but I don't see an elegant solution in that ticket, so maybe it's time to accept this.

comment:2 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:3 by direx, 8 years ago

Cc: direx added
Note: See TracTickets for help on using tickets.
Back to Top