[PR #15675] [MERGED] 15671 save module before sync_classes #14641

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15675
Author: @arthanson
Created: 4/9/2024
Status: Merged
Merged: 4/15/2024
Merged by: @jeremystretch

Base: featureHead: 15671-script-save


📝 Commits (2)

  • 281d70b 15671 save module before sync_classes
  • ae21be7 15671 don't return save

📊 Changes

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

View changed files

📝 netbox/extras/models/scripts.py (+1 -1)

📄 Description

Fixes: #15671

save Module before doing sync_classes as it can cause M2M error: ValueError: save() prohibited to prevent data loss due to unsaved related object 'module'.


🔄 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/15675 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 4/9/2024 **Status:** ✅ Merged **Merged:** 4/15/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15671-script-save` --- ### 📝 Commits (2) - [`281d70b`](https://github.com/netbox-community/netbox/commit/281d70b6e1a8c2ee935b4f879f4f34dcc94db577) 15671 save module before sync_classes - [`ae21be7`](https://github.com/netbox-community/netbox/commit/ae21be7fd34adaa83e98041f8912241c3a28b203) 15671 don't return save ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/models/scripts.py` (+1 -1) </details> ### 📄 Description ### Fixes: #15671 save Module before doing sync_classes as it can cause M2M error: `ValueError: save() prohibited to prevent data loss due to unsaved related object 'module'.` --- <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:25:42 +01:00
adam closed this issue 2025-12-29 23:25:42 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14641