fix version in text

This commit is contained in:
Cayo Puigdefabregas 2022-05-20 18:31:47 +02:00
parent 3f2d3df817
commit d63a256da5
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class InventoryView(LoginMixin, SnapshotMixin):
snapshot_uuid=snapshot.uuid, snapshot_uuid=snapshot.uuid,
severity=Severity.Info, severity=Severity.Info,
sid=snapshot.sid, sid=snapshot.sid,
version=snapshot.version, version=str(snapshot.version),
snapshot=snapshot, snapshot=snapshot,
) )
snap_log.save() snap_log.save()
@ -97,7 +97,7 @@ class InventoryView(LoginMixin, SnapshotMixin):
snapshot_uuid=uuid, snapshot_uuid=uuid,
severity=Severity.Error, severity=Severity.Error,
sid=sid, sid=sid,
version=version, version=str(version),
) )
error.save(commit=True) error.save(commit=True)
# raise err # raise err

View File

@ -320,7 +320,7 @@ class ParseSnapshotLsHw:
self.default = default self.default = default
self.uuid = snapshot.get("uuid") self.uuid = snapshot.get("uuid")
self.sid = snapshot.get("sid") self.sid = snapshot.get("sid")
self.version = snapshot.get("version") self.version = str(snapshot.get("version"))
self.dmidecode_raw = snapshot["data"]["dmidecode"] self.dmidecode_raw = snapshot["data"]["dmidecode"]
self.smart = snapshot["data"]["smart"] self.smart = snapshot["data"]["smart"]
self.hwinfo_raw = snapshot["data"]["hwinfo"] self.hwinfo_raw = snapshot["data"]["hwinfo"]