[PR #11730] [MERGED] Fixes #9653 - Add default_platform to DeviceType #13832

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11730
Author: @kkthxbye-code
Created: 2/10/2023
Status: Merged
Merged: 2/13/2023
Merged by: @jeremystretch

Base: featureHead: 9653-add-default-platform-devicetype


📝 Commits (1)

📊 Changes

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

View changed files

📝 netbox/dcim/api/serializers.py (+2 -1)
📝 netbox/dcim/filtersets.py (+10 -0)
📝 netbox/dcim/forms/bulk_edit.py (+5 -1)
📝 netbox/dcim/forms/bulk_import.py (+7 -2)
📝 netbox/dcim/forms/filtersets.py (+6 -1)
📝 netbox/dcim/forms/model_forms.py (+6 -2)
netbox/dcim/migrations/0169_devicetype_default_platform.py (+19 -0)
📝 netbox/dcim/models/devices.py (+14 -1)
📝 netbox/dcim/tables/devicetypes.py (+4 -1)
📝 netbox/dcim/tests/test_filtersets.py (+16 -2)
📝 netbox/dcim/tests/test_views.py (+15 -2)
📝 netbox/templates/dcim/devicetype.html (+4 -0)

📄 Description

Fixes: #9653

Add default_platform to DeviceType. I think I got all the places updated and tests created. If anything is missing please let me know.

Only thing I was a little in doubt about is if the new field on the DeviceType model should have a related_name or not. In the current PR it doesn't, let me know if I should change it.


🔄 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/11730 **Author:** [@kkthxbye-code](https://github.com/kkthxbye-code) **Created:** 2/10/2023 **Status:** ✅ Merged **Merged:** 2/13/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `9653-add-default-platform-devicetype` --- ### 📝 Commits (1) - [`318505b`](https://github.com/netbox-community/netbox/commit/318505b61a61f2509166bde6e63db23e13ec6f02) Fixes #9653 - Add default_platform to DeviceType ### 📊 Changes **12 files changed** (+108 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/api/serializers.py` (+2 -1) 📝 `netbox/dcim/filtersets.py` (+10 -0) 📝 `netbox/dcim/forms/bulk_edit.py` (+5 -1) 📝 `netbox/dcim/forms/bulk_import.py` (+7 -2) 📝 `netbox/dcim/forms/filtersets.py` (+6 -1) 📝 `netbox/dcim/forms/model_forms.py` (+6 -2) ➕ `netbox/dcim/migrations/0169_devicetype_default_platform.py` (+19 -0) 📝 `netbox/dcim/models/devices.py` (+14 -1) 📝 `netbox/dcim/tables/devicetypes.py` (+4 -1) 📝 `netbox/dcim/tests/test_filtersets.py` (+16 -2) 📝 `netbox/dcim/tests/test_views.py` (+15 -2) 📝 `netbox/templates/dcim/devicetype.html` (+4 -0) </details> ### 📄 Description ### Fixes: #9653 Add default_platform to DeviceType. I think I got all the places updated and tests created. If anything is missing please let me know. Only thing I was a little in doubt about is if the new field on the DeviceType model should have a related_name or not. In the current PR it doesn't, let me know if I should change it. --- <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:03 +01:00
adam closed this issue 2025-12-29 23:21:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13832