From 3563234d708387851d8ae37f63a183726ae5d37e Mon Sep 17 00:00:00 2001 From: Torma Date: Sat, 3 Oct 2020 12:47:44 +0200 Subject: [PATCH] change schema --- src/schemas.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/schemas.py b/src/schemas.py index 459a957..2dc8ab1 100644 --- a/src/schemas.py +++ b/src/schemas.py @@ -1,4 +1,6 @@ #!/usr/bin/env python3 +from flask_marshmallow.sqla import auto_field + from models import SampleMetadata from marshm import ma from marshmallow import fields @@ -32,4 +34,5 @@ class SampleMetadataSchema(ma.SQLAlchemyAutoSchema): """ class Meta: model = SampleMetadata - exclude = ('timestamp', 'id',) + exclude = ('timestamp', 'id', 'device_date',) + date = auto_field("device_date", dump_only=False)