From d63a256da5d0064eaad6a5100e9e147702d82a30 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Fri, 20 May 2022 18:31:47 +0200 Subject: [PATCH] fix version in text --- ereuse_devicehub/api/views.py | 4 ++-- ereuse_devicehub/parser/parser.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py index db7f0c9d..dd06042c 100644 --- a/ereuse_devicehub/api/views.py +++ b/ereuse_devicehub/api/views.py @@ -65,7 +65,7 @@ class InventoryView(LoginMixin, SnapshotMixin): snapshot_uuid=snapshot.uuid, severity=Severity.Info, sid=snapshot.sid, - version=snapshot.version, + version=str(snapshot.version), snapshot=snapshot, ) snap_log.save() @@ -97,7 +97,7 @@ class InventoryView(LoginMixin, SnapshotMixin): snapshot_uuid=uuid, severity=Severity.Error, sid=sid, - version=version, + version=str(version), ) error.save(commit=True) # raise err diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py index ee361738..fa511f66 100644 --- a/ereuse_devicehub/parser/parser.py +++ b/ereuse_devicehub/parser/parser.py @@ -320,7 +320,7 @@ class ParseSnapshotLsHw: self.default = default self.uuid = snapshot.get("uuid") self.sid = snapshot.get("sid") - self.version = snapshot.get("version") + self.version = str(snapshot.get("version")) self.dmidecode_raw = snapshot["data"]["dmidecode"] self.smart = snapshot["data"]["smart"] self.hwinfo_raw = snapshot["data"]["hwinfo"]