Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Jan 30, 2026

Fixes: #21267

This PR updates the device Dimensions panel to render rack unit height using TemplatedAttr and a dedicated template applying Django’s floatformat filter.

As a result, devices with a u_height of 0.0 now display as 0U (and whole-unit values no longer show a trailing .0), matching the expected rack-unit presentation and avoiding ambiguity for users.

Thanks for the review!

Use `TemplatedAttr` for device height and render using Django's
`floatformat` filter so 0.0 is displayed as `0U` (and whole-U values
omit the decimal).

Fixes #21267
@pheus pheus requested review from a team and bctiemann and removed request for a team January 30, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

change device dimension display when devices are 0.0 height

2 participants