[PR #10900] [MERGED] #10694: Emit post_save signal when creating/updating device components in bulk #13711

Closed
opened 2025-12-29 23:20:23 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10900
Author: @jeremystretch
Created: 11/11/2022
Status: Merged
Merged: 11/14/2022
Merged by: @jeremystretch

Base: featureHead: 10694-bulk_create-signals


📝 Commits (2)

  • ab8efd6 Emit post_save signal when creating/updating device components in bulk
  • a26dab4 Fix post_save for bulk_update()

📊 Changes

1 file changed (+64 additions, -33 deletions)

View changed files

📝 netbox/dcim/models/devices.py (+64 -33)

📄 Description

Fixes: #10694

This PR is an alternative to #10780. Rather than removing the calls to bulk_create() and bulk_update(), it leaves them in place and manually emits the post_save signal for each object.

I've restricted the scope of this PR to the bulk creation and modification of device components, as I don't believe the few other instances of bulk operation usage called out in #10694 are harmful (though it's entirely possible I'm wrong).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/10900 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/11/2022 **Status:** ✅ Merged **Merged:** 11/14/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `10694-bulk_create-signals` --- ### 📝 Commits (2) - [`ab8efd6`](https://github.com/netbox-community/netbox/commit/ab8efd6e5f89191e75de69d89cb0e5c331850f90) Emit post_save signal when creating/updating device components in bulk - [`a26dab4`](https://github.com/netbox-community/netbox/commit/a26dab4fb17f27925576310623b77afca2bde699) Fix post_save for bulk_update() ### 📊 Changes **1 file changed** (+64 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/devices.py` (+64 -33) </details> ### 📄 Description ### Fixes: #10694 This PR is an alternative to #10780. Rather than removing the calls to `bulk_create()` and `bulk_update()`, it leaves them in place and manually emits the `post_save` signal for each object. I've restricted the scope of this PR to the bulk creation and modification of device components, as I don't believe the few other instances of bulk operation usage called out in #10694 are harmful (though it's entirely possible I'm wrong). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:20:23 +01:00
adam closed this issue 2025-12-29 23:20:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13711