Commit 871c0afb authored by Zach Perkins's avatar Zach Perkins

Get children as nested json, not just ID

parent 3c91dd74
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema, auto_field
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema, fields
from .model import Point, Category, Field, Session
class BaseSchema(SQLAlchemyAutoSchema):
......@@ -8,6 +8,8 @@ class BaseSchema(SQLAlchemyAutoSchema):
class PointSchema(BaseSchema):
children = fields.Nested('PointSchema', exclude=('children',), many=True)
class Meta(BaseSchema.Meta):
model = Point
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment