mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #15322: Add description field to YAML export for device & module types
This commit is contained in:
@ -229,15 +229,16 @@ class DeviceType(ImageAttachmentsMixin, PrimaryModel, WeightMixin):
|
|||||||
'manufacturer': self.manufacturer.name,
|
'manufacturer': self.manufacturer.name,
|
||||||
'model': self.model,
|
'model': self.model,
|
||||||
'slug': self.slug,
|
'slug': self.slug,
|
||||||
|
'description': self.description,
|
||||||
'default_platform': self.default_platform.name if self.default_platform else None,
|
'default_platform': self.default_platform.name if self.default_platform else None,
|
||||||
'part_number': self.part_number,
|
'part_number': self.part_number,
|
||||||
'u_height': float(self.u_height),
|
'u_height': float(self.u_height),
|
||||||
'is_full_depth': self.is_full_depth,
|
'is_full_depth': self.is_full_depth,
|
||||||
'subdevice_role': self.subdevice_role,
|
'subdevice_role': self.subdevice_role,
|
||||||
'airflow': self.airflow,
|
'airflow': self.airflow,
|
||||||
'comments': self.comments,
|
|
||||||
'weight': float(self.weight) if self.weight is not None else None,
|
'weight': float(self.weight) if self.weight is not None else None,
|
||||||
'weight_unit': self.weight_unit,
|
'weight_unit': self.weight_unit,
|
||||||
|
'comments': self.comments,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Component templates
|
# Component templates
|
||||||
@ -415,9 +416,10 @@ class ModuleType(ImageAttachmentsMixin, PrimaryModel, WeightMixin):
|
|||||||
'manufacturer': self.manufacturer.name,
|
'manufacturer': self.manufacturer.name,
|
||||||
'model': self.model,
|
'model': self.model,
|
||||||
'part_number': self.part_number,
|
'part_number': self.part_number,
|
||||||
'comments': self.comments,
|
'description': self.description,
|
||||||
'weight': float(self.weight) if self.weight is not None else None,
|
'weight': float(self.weight) if self.weight is not None else None,
|
||||||
'weight_unit': self.weight_unit,
|
'weight_unit': self.weight_unit,
|
||||||
|
'comments': self.comments,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Component templates
|
# Component templates
|
||||||
|
Reference in New Issue
Block a user