From a6fe72608fc1cc7a58f9c0f83fc39e6965378261 Mon Sep 17 00:00:00 2001 From: inexcode Date: Mon, 25 Jul 2022 17:17:57 +0300 Subject: [PATCH] Bytes from int to str --- selfprivacy_api/graphql/queries/storage.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/selfprivacy_api/graphql/queries/storage.py b/selfprivacy_api/graphql/queries/storage.py index 0058a20..31ef354 100644 --- a/selfprivacy_api/graphql/queries/storage.py +++ b/selfprivacy_api/graphql/queries/storage.py @@ -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, )