[PR #4311] [MERGED] Fixes #4298: Bulk creation of objects with custom fields via API #12815

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4311
Author: @jeremystretch
Created: 3/4/2020
Status: Merged
Merged: 3/4/2020
Merged by: @jeremystretch

Base: developHead: 4298-custom-fields-api


📝 Commits (3)

  • e4abfd1 Introduce CustomFieldDefaultValues class to handle default custom field values
  • 4611536 Revise custom field API tests to check for single/multiple objects with/without custom field values
  • 57b6ac7 Finish work on improved custom fields API tests

📊 Changes

2 files changed (+335 additions, -225 deletions)

View changed files

📝 netbox/extras/api/customfields.py (+58 -37)
📝 netbox/extras/tests/test_customfields.py (+277 -188)

📄 Description

Fixes: #4298

  • Fix the bug by introducing CustomFieldDefaultValues to handle default value assignment
  • Improve and extend API tests to check assignment of default values

🔄 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/4311 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 3/4/2020 **Status:** ✅ Merged **Merged:** 3/4/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `4298-custom-fields-api` --- ### 📝 Commits (3) - [`e4abfd1`](https://github.com/netbox-community/netbox/commit/e4abfd192ef71fbd413aa0c99e6085cbb11e758a) Introduce CustomFieldDefaultValues class to handle default custom field values - [`4611536`](https://github.com/netbox-community/netbox/commit/4611536ca97ef925a2b10c7a56a61806720ea195) Revise custom field API tests to check for single/multiple objects with/without custom field values - [`57b6ac7`](https://github.com/netbox-community/netbox/commit/57b6ac7cb1bc2136c34b9160a099f2f60c47821e) Finish work on improved custom fields API tests ### 📊 Changes **2 files changed** (+335 additions, -225 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/api/customfields.py` (+58 -37) 📝 `netbox/extras/tests/test_customfields.py` (+277 -188) </details> ### 📄 Description ### Fixes: #4298 - Fix the bug by introducing CustomFieldDefaultValues to handle default value assignment - Improve and extend API tests to check assignment of default values --- <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 22:23:46 +01:00
adam closed this issue 2025-12-29 22:23:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12815