Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#17583 closed New feature (duplicate)

Add raw kwarg to m2m signals

Reported by: mjtamlyn Owned by: nobody
Component: Database layer (models, ORM) Version: 1.3
Severity: Normal Keywords: signal, m2m
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I think the m2m_changed signal would benefit from a raw flag similar to the pre_save and post_save signals. I've got some signals called on M2M change which die when called during fixture loading. At present the only way I can see to do this is to hook into the pre_save and cache that I'm in fixture-loading mode... Pretty nasty!

Change History (2)

comment:1 Changed 4 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

You'll probably want the solution proposed in #8399

comment:2 Changed 4 years ago by anonymous

  • Triage Stage changed from Unreviewed to Design decision needed

That does work, but it's a pretty unpleasant solution. I'd like to know the design decision behind that option existing on models but not M2M - consistent design seems more suitable to me than stack inspection hacks.

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