[PR #20281] [MERGED] Closes #20277: Add support for attribute assignment to deserialize_object() #15872

Closed
opened 2025-12-30 00:24:32 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20281
Author: @jeremystretch
Created: 9/5/2025
Status: Merged
Merged: 9/8/2025
Merged by: @arthanson

Base: mainHead: 20277-deserialize_object


📝 Commits (1)

  • 41f69b8 Closes #20277: Add support for attribute assignment to deserialize_object()

📊 Changes

2 files changed (+70 additions, -6 deletions)

View changed files

📝 netbox/utilities/serialization.py (+21 -6)
netbox/utilities/tests/test_serialization.py (+49 -0)

📄 Description

Closes: #20277

  • Pop any non-field attributes out of the data prior to serialization, then apply them to the deserialized object
  • Add tests for both serialize_object() and deserialize_object()

🔄 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/20281 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 9/5/2025 **Status:** ✅ Merged **Merged:** 9/8/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `20277-deserialize_object` --- ### 📝 Commits (1) - [`41f69b8`](https://github.com/netbox-community/netbox/commit/41f69b8f3199f64d185971830f52f62197e5645a) Closes #20277: Add support for attribute assignment to deserialize_object() ### 📊 Changes **2 files changed** (+70 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/serialization.py` (+21 -6) ➕ `netbox/utilities/tests/test_serialization.py` (+49 -0) </details> ### 📄 Description ### Closes: #20277 - Pop any non-field attributes out of the data prior to serialization, then apply them to the deserialized object - Add tests for both `serialize_object()` and `deserialize_object()` --- <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-30 00:24:32 +01:00
adam closed this issue 2025-12-30 00:24:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15872