mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-19 05:21:55 -06:00
Fixes #4684: Fix ignored comment when importing DeviceType
This commit is contained in:
parent
1f5d2520c3
commit
74c29b0bb7
@ -16,6 +16,7 @@
|
|||||||
* [#4647](https://github.com/netbox-community/netbox/issues/4647) - Fix caching invalidation issue related to assigning new IP addresses to interfaces
|
* [#4647](https://github.com/netbox-community/netbox/issues/4647) - Fix caching invalidation issue related to assigning new IP addresses to interfaces
|
||||||
* [#4648](https://github.com/netbox-community/netbox/issues/4648) - Fix bulk CSV import of child devices
|
* [#4648](https://github.com/netbox-community/netbox/issues/4648) - Fix bulk CSV import of child devices
|
||||||
* [#4649](https://github.com/netbox-community/netbox/issues/4649) - Fix interface assignment for bulk-imported IP addresses
|
* [#4649](https://github.com/netbox-community/netbox/issues/4649) - Fix interface assignment for bulk-imported IP addresses
|
||||||
|
* [#4684](https://github.com/netbox-community/netbox/issues/4684) - Fix ignored comment field when adding device type via YAML/JSON import.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -932,6 +932,7 @@ class DeviceTypeImportForm(BootstrapMixin, forms.ModelForm):
|
|||||||
model = DeviceType
|
model = DeviceType
|
||||||
fields = [
|
fields = [
|
||||||
'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role',
|
'manufacturer', 'model', 'slug', 'part_number', 'u_height', 'is_full_depth', 'subdevice_role',
|
||||||
|
'comments',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -366,6 +366,7 @@ manufacturer: Generic
|
|||||||
model: TEST-1000
|
model: TEST-1000
|
||||||
slug: test-1000
|
slug: test-1000
|
||||||
u_height: 2
|
u_height: 2
|
||||||
|
comments: test comment
|
||||||
console-ports:
|
console-ports:
|
||||||
- name: Console Port 1
|
- name: Console Port 1
|
||||||
type: de-9
|
type: de-9
|
||||||
@ -456,6 +457,7 @@ device-bays:
|
|||||||
self.assertHttpStatus(response, 200)
|
self.assertHttpStatus(response, 200)
|
||||||
|
|
||||||
dt = DeviceType.objects.get(model='TEST-1000')
|
dt = DeviceType.objects.get(model='TEST-1000')
|
||||||
|
self.assertEqual(dt.comments, 'test comment')
|
||||||
|
|
||||||
# Verify all of the components were created
|
# Verify all of the components were created
|
||||||
self.assertEqual(dt.consoleport_templates.count(), 3)
|
self.assertEqual(dt.consoleport_templates.count(), 3)
|
||||||
|
Loading…
Reference in New Issue
Block a user