mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 02:58:17 -06:00
Addressed PR comments.
Changed humanize_megabytes in helpers.py
This commit is contained in:
parent
c91c25d059
commit
d3e9906af3
@ -96,8 +96,6 @@ def humanize_megabytes(mb):
|
|||||||
"""
|
"""
|
||||||
if not mb:
|
if not mb:
|
||||||
return ''
|
return ''
|
||||||
if len(str(mb)) < 6:
|
|
||||||
return mb
|
|
||||||
if not mb % 1048576: # 1024^2
|
if not mb % 1048576: # 1024^2
|
||||||
return f'{int(mb / 1048576)} TB'
|
return f'{int(mb / 1048576)} TB'
|
||||||
if not mb % 1024:
|
if not mb % 1024:
|
||||||
|
Loading…
Reference in New Issue
Block a user