[PR #16008] [MERGED] Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests #14752

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16008
Author: @jeremystretch
Created: 5/7/2024
Status: Merged
Merged: 5/7/2024
Merged by: @jeremystretch

Base: developHead: 15995-fix-unique-constraints-null-fields


📝 Commits (1)

  • dd713bb Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests

📊 Changes

8 files changed (+13 additions, -12 deletions)

View changed files

📝 netbox/circuits/api/serializers_/circuits.py (+1 -1)
📝 netbox/circuits/api/serializers_/providers.py (+1 -0)
📝 netbox/circuits/tests/test_api.py (+2 -2)
📝 netbox/dcim/api/serializers_/devices.py (+1 -0)
📝 netbox/dcim/api/serializers_/sites.py (+1 -1)
📝 netbox/dcim/tests/test_api.py (+2 -2)
📝 netbox/tenancy/api/serializers_/tenants.py (+1 -1)
📝 netbox/virtualization/api/serializers_/virtualmachines.py (+4 -5)

📄 Description

Fixes: #15995

  • Set a default value on each of the relevant fields in API serializers
  • Modify tests to omit these fields in some object representations

🔄 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/16008 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 5/7/2024 **Status:** ✅ Merged **Merged:** 5/7/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15995-fix-unique-constraints-null-fields` --- ### 📝 Commits (1) - [`dd713bb`](https://github.com/netbox-community/netbox/commit/dd713bbe4c5926f05f65ae32067d1ef77a1564d4) Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests ### 📊 Changes **8 files changed** (+13 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/api/serializers_/circuits.py` (+1 -1) 📝 `netbox/circuits/api/serializers_/providers.py` (+1 -0) 📝 `netbox/circuits/tests/test_api.py` (+2 -2) 📝 `netbox/dcim/api/serializers_/devices.py` (+1 -0) 📝 `netbox/dcim/api/serializers_/sites.py` (+1 -1) 📝 `netbox/dcim/tests/test_api.py` (+2 -2) 📝 `netbox/tenancy/api/serializers_/tenants.py` (+1 -1) 📝 `netbox/virtualization/api/serializers_/virtualmachines.py` (+4 -5) </details> ### 📄 Description ### Fixes: #15995 - Set a default value on each of the relevant fields in API serializers - Modify tests to omit these fields in some object representations --- <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:26:29 +01:00
adam closed this issue 2025-12-29 23:26:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14752