Skip to content

Commit 8bdbb49

Browse files
committed
Fixes #15322: Add description field to YAML export for device & module types
1 parent 7ac2169 commit 8bdbb49

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

netbox/dcim/models/devices.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,16 @@ def to_yaml(self):
229229
'manufacturer': self.manufacturer.name,
230230
'model': self.model,
231231
'slug': self.slug,
232+
'description': self.description,
232233
'default_platform': self.default_platform.name if self.default_platform else None,
233234
'part_number': self.part_number,
234235
'u_height': float(self.u_height),
235236
'is_full_depth': self.is_full_depth,
236237
'subdevice_role': self.subdevice_role,
237238
'airflow': self.airflow,
238-
'comments': self.comments,
239239
'weight': float(self.weight) if self.weight is not None else None,
240240
'weight_unit': self.weight_unit,
241+
'comments': self.comments,
241242
}
242243

243244
# Component templates
@@ -415,9 +416,10 @@ def to_yaml(self):
415416
'manufacturer': self.manufacturer.name,
416417
'model': self.model,
417418
'part_number': self.part_number,
418-
'comments': self.comments,
419+
'description': self.description,
419420
'weight': float(self.weight) if self.weight is not None else None,
420421
'weight_unit': self.weight_unit,
422+
'comments': self.comments,
421423
}
422424

423425
# Component templates

0 commit comments

Comments
 (0)