[PR #12262] [MERGED] Closes #12129: Enable automatic synchronization of objects when DataFiles are updated #13937

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12262
Author: @jeremystretch
Created: 4/14/2023
Status: Merged
Merged: 4/17/2023
Merged by: @jeremystretch

Base: featureHead: 12129-auto-syncing


📝 Commits (2)

  • 8090497 Closes #12129: Enable automatic synchronization of objects when DataFiles are updated
  • 9885184 Cleanup

📊 Changes

11 files changed (+120 additions, -17 deletions)

View changed files

📝 netbox/core/forms/model_forms.py (+2 -2)
📝 netbox/core/migrations/0001_initial.py (+17 -0)
📝 netbox/core/migrations/0002_managedfile.py (+1 -0)
📝 netbox/core/models/data.py (+35 -1)
📝 netbox/core/signals.py (+14 -3)
📝 netbox/extras/forms/model_forms.py (+4 -4)
📝 netbox/extras/migrations/0085_synced_data.py (+10 -0)
📝 netbox/extras/migrations/0086_configtemplate.py (+1 -0)
📝 netbox/netbox/api/features.py (+1 -2)
📝 netbox/netbox/models/features.py (+33 -1)
📝 netbox/netbox/views/generic/feature_views.py (+2 -4)

📄 Description

Closes: #12129

  • Introduce the AutoSyncRecord model to cache objects that need to be auto-synced
  • Add the auto_sync_enabled boolean field to SyncedDataMixin
  • Extend save() on SyncedDataMixin to automatically create/delete auto-sync records
  • Create auto_sync() receiver for the post_sync signal
  • Add a save kwarg to sync() on SyncedDataMixin (for convenience)

🔄 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/12262 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 4/14/2023 **Status:** ✅ Merged **Merged:** 4/17/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12129-auto-syncing` --- ### 📝 Commits (2) - [`8090497`](https://github.com/netbox-community/netbox/commit/80904979a27ffe16fe8faa3584e05ccde884889b) Closes #12129: Enable automatic synchronization of objects when DataFiles are updated - [`9885184`](https://github.com/netbox-community/netbox/commit/988518477636c729aabb81a1464212029077d0cb) Cleanup ### 📊 Changes **11 files changed** (+120 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `netbox/core/forms/model_forms.py` (+2 -2) 📝 `netbox/core/migrations/0001_initial.py` (+17 -0) 📝 `netbox/core/migrations/0002_managedfile.py` (+1 -0) 📝 `netbox/core/models/data.py` (+35 -1) 📝 `netbox/core/signals.py` (+14 -3) 📝 `netbox/extras/forms/model_forms.py` (+4 -4) 📝 `netbox/extras/migrations/0085_synced_data.py` (+10 -0) 📝 `netbox/extras/migrations/0086_configtemplate.py` (+1 -0) 📝 `netbox/netbox/api/features.py` (+1 -2) 📝 `netbox/netbox/models/features.py` (+33 -1) 📝 `netbox/netbox/views/generic/feature_views.py` (+2 -4) </details> ### 📄 Description ### Closes: #12129 - Introduce the `AutoSyncRecord` model to cache objects that need to be auto-synced - Add the `auto_sync_enabled` boolean field to `SyncedDataMixin` - Extend `save()` on `SyncedDataMixin` to automatically create/delete auto-sync records - Create `auto_sync()` receiver for the `post_sync` signal - Add a `save` kwarg to `sync()` on `SyncedDataMixin` (for convenience) --- <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:21:39 +01:00
adam closed this issue 2025-12-29 23:21:39 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13937