Open kristaps opened 7 years ago
This actually works in versions <2.9. I found this issue when I upgraded my packages and a bunch of tests started failing with IntegrityErrors.
Would be nice to get some clarity on this. There's a point to be made about muting signals in the first place, but having the functionality there and not having it muted in SubFactories does seem counter-intuitive.
If someone could point me in the right direction to restore this behaviour (if desired) I would be happy to make a PR for this.
It would be nice to have this behavior back indeed! In the mean time, the workaround proposed for muting specific receivers can be used here as well (muting the signal altogether): https://github.com/FactoryBoy/factory_boy/issues/505#issuecomment-436316484
Any updates on a fix to this?
The fix is merged, will be available in the next release. (You can try using git version)
It appears that using SubFactory bypasses any signal muting attached to the factory used, which seems counter-intuitive.
Is it possible to keep the muting defined on the factory, or to allow controlling the signal muting when invoking SubFactory?
An example to demonstrate the problem: