Fixed marshmallow stuff
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9b3d176eed
commit
782728e661
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from .default_schema import DefaultSchema
|
from .default_schema import DefaultSchema
|
||||||
from .aimodel_schema import AIModelSchema
|
from .aimodel_schema import AIModelSchema
|
||||||
from .info_schema import InfoSchema
|
from .info_schema import InfoSchema
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from marshmallow import fields
|
from marshmallow import fields
|
||||||
from marshmallow_sqlalchemy import ModelSchema
|
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
|
||||||
from marshmallow_enum import EnumField
|
from marshmallow_enum import EnumField
|
||||||
from model import AIModel, AIModelType
|
from model import AIModel, AIModelType
|
||||||
|
|
||||||
from .svmdetails_schema import SVMDetailsSchema
|
from .svmdetails_schema import SVMDetailsSchema
|
||||||
|
|
||||||
|
|
||||||
class AIModelSchema(ModelSchema):
|
class AIModelSchema(SQLAlchemyAutoSchema):
|
||||||
|
|
||||||
_svm_details_schema = SVMDetailsSchema(many=False, exclude=["aimodel"])
|
_svm_details_schema = SVMDetailsSchema(many=False, exclude=["aimodel"])
|
||||||
|
|
||||||
@ -29,3 +29,6 @@ class AIModelSchema(ModelSchema):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = AIModel
|
model = AIModel
|
||||||
|
include_relationships = True
|
||||||
|
load_instance = True
|
||||||
|
include_fk = True
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from marshmallow import fields
|
from marshmallow import fields
|
||||||
from marshmallow_sqlalchemy import ModelSchema
|
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
|
||||||
from model import SVMDetails
|
from model import SVMDetails
|
||||||
|
|
||||||
|
|
||||||
class SVMDetailsSchema(ModelSchema):
|
class SVMDetailsSchema(SQLAlchemyAutoSchema):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = SVMDetails
|
model = SVMDetails
|
||||||
|
include_relationships = True
|
||||||
|
load_instance = True
|
||||||
|
include_fk = True
|
||||||
|
@ -6,7 +6,7 @@ Flask-Classful
|
|||||||
Flask-SQLAlchemy
|
Flask-SQLAlchemy
|
||||||
SQLAlchemy-Utils
|
SQLAlchemy-Utils
|
||||||
SQLAlchemy
|
SQLAlchemy
|
||||||
marshmallow-sqlalchemy
|
marshmallow-sqlalchemy~=0.26.1
|
||||||
marshmallow-enum
|
marshmallow-enum
|
||||||
psycopg2-binary
|
psycopg2-binary
|
||||||
minio~=6.0.0
|
minio~=6.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user