bypassed_effects
Identifies Django bulk operations that bypass model save() signals and receivers, highlighting where side effects like cache invalidation or search index updates may be missed.
Instructions
Bulk writes that skip everything the model's save() chain promised.
what_happens_on says saving an Order creates an Invoice. That is true for
order.save() and false for Order.objects.bulk_create(), .bulk_update() and
.update(): they go straight to SQL, so no save() override runs and no
pre_save/post_save receiver fires. Django documents this in one sentence
per method; nothing at the call site says it.
The finding is not "bulk_create bypasses signals" but this call, on this
model, skips these named effects - the receivers, the overridden save(),
the models that would have been written, transitively. A cache that never
gets invalidated and a search index that quietly drifts are both this.
Only models whose chain does something are reported. QuerySet.delete() is
not listed: Django sends delete signals per object, so that chain fires.
Args:
search_path: directory to scan. Defaults to the project root.
model: restrict to one "app_label.ModelName".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| search_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||