Skip to content

Commit

Permalink
Closes nautobot#5274: Formats RU number to minimum of two digits
Browse files Browse the repository at this point in the history
  • Loading branch information
tsm1th committed Apr 1, 2024
1 parent 64961e0 commit 2152e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nautobot/dcim/elevations.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def render(self, face, unit_width, unit_height, legend_width):
start_y + unit_height / 2 + RACK_ELEVATION_BORDER_WIDTH,
)
unit = ru + 1 if self.rack.desc_units else self.rack.u_height - ru
drawing.add(drawing.text(str(unit), position_coordinates, class_="unit"))
drawing.add(drawing.text(f"{unit:02d}", position_coordinates, class_="unit"))

for unit in self.merge_elevations(face):
# Loop through all units in the elevation
Expand Down

0 comments on commit 2152e1e

Please sign in to comment.