This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/ereuse_devicehub/marshmallow.py

34 lines
765 B
Python
Raw Normal View History

2018-04-27 17:16:43 +00:00
from marshmallow.fields import missing_
2018-09-07 10:38:02 +00:00
from ereuse_devicehub.db import db
2023-03-21 11:08:13 +00:00
from ereuse_devicehub.teal.db import SQLAlchemy
from ereuse_devicehub.teal.marshmallow import NestedOn as TealNestedOn
2018-09-07 10:38:02 +00:00
2018-04-27 17:16:43 +00:00
class NestedOn(TealNestedOn):
__doc__ = TealNestedOn.__doc__
2018-04-30 17:58:19 +00:00
2023-03-21 11:08:13 +00:00
def __init__(
self,
nested,
polymorphic_on='type',
db: SQLAlchemy = db,
collection_class=list,
default=missing_,
exclude=tuple(),
only_query: str = None,
only=None,
**kwargs,
):
super().__init__(
nested,
polymorphic_on,
db,
collection_class,
default,
exclude,
only_query,
only,
**kwargs,
)