[PR #15768] [MERGED] 15588 set readonly nullable fields as allow_null=True #14675

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

📋 Pull Request Information

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

Base: developHead: 15588-nullable-openapi


📝 Commits (1)

  • 73bc9db 15588 set readonly nullable fields as allow_null=True

📊 Changes

3 files changed (+10 additions, -10 deletions)

View changed files

📝 netbox/dcim/api/serializers.py (+4 -4)
📝 netbox/ipam/api/serializers.py (+5 -5)
📝 netbox/virtualization/api/serializers.py (+1 -1)

📄 Description

Fixes: #15588

As mentioned in the bug report, several fields are readonly but can also allow null return. I did a scan through the code and tried to identify all issues of this - checking that the model can actually return a null for those fields.


🔄 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/15768 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 4/19/2024 **Status:** ✅ Merged **Merged:** 4/19/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `15588-nullable-openapi` --- ### 📝 Commits (1) - [`73bc9db`](https://github.com/netbox-community/netbox/commit/73bc9db1da7b36d2cb39851a8e05e8c8694ee6eb) 15588 set readonly nullable fields as allow_null=True ### 📊 Changes **3 files changed** (+10 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/serializers.py` (+4 -4) 📝 `netbox/ipam/api/serializers.py` (+5 -5) 📝 `netbox/virtualization/api/serializers.py` (+1 -1) </details> ### 📄 Description ### Fixes: #15588 As mentioned in the bug report, several fields are readonly but can also allow null return. I did a scan through the code and tried to identify all issues of this - checking that the model can actually return a null for those fields. --- <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:54 +01:00
adam closed this issue 2025-12-29 23:25:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14675