Fixed marshmallow stuff
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2021-08-05 14:42:23 +02:00
parent 9b3d176eed
commit 782728e661
4 changed files with 12 additions and 6 deletions

View File

@ -1,14 +1,14 @@
#!/usr/bin/env python3
from typing import Optional
from marshmallow import fields
from marshmallow_sqlalchemy import ModelSchema
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from marshmallow_enum import EnumField
from model import AIModel, AIModelType
from .svmdetails_schema import SVMDetailsSchema
class AIModelSchema(ModelSchema):
class AIModelSchema(SQLAlchemyAutoSchema):
_svm_details_schema = SVMDetailsSchema(many=False, exclude=["aimodel"])
@ -29,3 +29,6 @@ class AIModelSchema(ModelSchema):
class Meta:
model = AIModel
include_relationships = True
load_instance = True
include_fk = True

View File

@ -1,10 +1,13 @@
#!/usr/bin/env python3
from marshmallow import fields
from marshmallow_sqlalchemy import ModelSchema
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from model import SVMDetails
class SVMDetailsSchema(ModelSchema):
class SVMDetailsSchema(SQLAlchemyAutoSchema):
class Meta:
model = SVMDetails
include_relationships = True
load_instance = True
include_fk = True

View File

@ -6,7 +6,7 @@ Flask-Classful
Flask-SQLAlchemy
SQLAlchemy-Utils
SQLAlchemy
marshmallow-sqlalchemy
marshmallow-sqlalchemy~=0.26.1
marshmallow-enum
psycopg2-binary
minio~=6.0.0