[PR #2285] [MERGED] Fix #2284: Record object deletions before the request finishes #12349

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2285
Author: @jeremystretch
Created: 7/30/2018
Status: Merged
Merged: 7/30/2018
Merged by: @jeremystretch

Base: develop-2.4Head: 2284-object-deletions


📝 Commits (1)

  • 249c3d0 Fixes #2284: Record object deletions before the request finishes

📊 Changes

2 files changed (+44 additions, -28 deletions)

View changed files

📝 netbox/extras/middleware.py (+39 -28)
📝 netbox/extras/webhooks.py (+5 -0)

📄 Description

Fixes: #2284

Handle pre_delete immediately, but wait until the request has finished to handle post_save.


🔄 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/2285 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/30/2018 **Status:** ✅ Merged **Merged:** 7/30/2018 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.4` ← **Head:** `2284-object-deletions` --- ### 📝 Commits (1) - [`249c3d0`](https://github.com/netbox-community/netbox/commit/249c3d0e81aa899ff16b7164752d9fe28863005d) Fixes #2284: Record object deletions before the request finishes ### 📊 Changes **2 files changed** (+44 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/middleware.py` (+39 -28) 📝 `netbox/extras/webhooks.py` (+5 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #2284 Handle `pre_delete` immediately, but wait until the request has finished to handle `post_save`. --- <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 22:21:01 +01:00
adam closed this issue 2025-12-29 22:21:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12349