change schema for lshw and smart data

This commit is contained in:
Cayo Puigdefabregas 2022-03-31 19:41:22 +02:00
parent 026a88acb8
commit 76336ff34d
1 changed files with 3 additions and 3 deletions

View File

@ -1,14 +1,14 @@
from flask import current_app as app from flask import current_app as app
from marshmallow import Schema as MarshmallowSchema from marshmallow import Schema as MarshmallowSchema
from marshmallow import ValidationError, validates_schema from marshmallow import ValidationError, validates_schema
from marshmallow.fields import Nested, String from marshmallow.fields import Dict, List, Nested, String
class Snapshot_lite_data(MarshmallowSchema): class Snapshot_lite_data(MarshmallowSchema):
dmidecode = String(required=False) dmidecode = String(required=False)
hwinfo = String(required=False) hwinfo = String(required=False)
smart = String(required=False) smart = List(Dict(), required=False)
lshw = String(required=False) lshw = Dict(required=False)
class Snapshot_lite(MarshmallowSchema): class Snapshot_lite(MarshmallowSchema):