Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ross I Kinsey
where
Commits
871c0afb
Commit
871c0afb
authored
Feb 24, 2020
by
Zach Perkins
Browse files
Get children as nested json, not just ID
parent
3c91dd74
Changes
1
Hide whitespace changes
Inline
Side-by-side
where/validation.py
View file @
871c0afb
from
marshmallow_sqlalchemy
import
SQLAlchemyAutoSchema
,
auto_
field
from
marshmallow_sqlalchemy
import
SQLAlchemyAutoSchema
,
field
s
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment