mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-22 12:11:26 +00:00
Bytes from int to str
This commit is contained in:
parent
5532114668
commit
a6fe72608f
|
@ -7,9 +7,9 @@ from selfprivacy_api.utils.block_devices import BlockDevices
|
|||
|
||||
@strawberry.type
|
||||
class StorageVolume:
|
||||
total_space: int
|
||||
free_space: int
|
||||
used_space: int
|
||||
total_space: str
|
||||
free_space: str
|
||||
used_space: str
|
||||
root: bool
|
||||
name: str
|
||||
|
||||
|
@ -21,9 +21,9 @@ class Storage:
|
|||
"""Get list of volumes"""
|
||||
return [
|
||||
StorageVolume(
|
||||
total_space=volume.fssize if volume.fssize is not None else volume.size,
|
||||
free_space=volume.fsavail,
|
||||
used_space=volume.fsused,
|
||||
total_space=str(volume.fssize) if volume.fssize is not None else str(volume.size),
|
||||
free_space=str(volume.fsavail),
|
||||
used_space=str(volume.fsused),
|
||||
root=volume.name == "sda1",
|
||||
name=volume.name,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue