-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
as_marshmallow_schema returned the following message for the ConstantField attribute:
@instance.register
class Dog(Document):
breed = fields.ConstantField("Mongrel")
DogMaSchema = Dog.schema.as_marshmallow_schema()
Traceback (most recent call last):
File "...\AppData\Local\Programs\Python\Python38\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 5, in <module>
File "...\.venv\lib\site-packages\umongo\abstract.py", line 66, in as_marshmallow_schema
nmspc = {
File "...\.venv\lib\site-packages\umongo\abstract.py", line 67, in <dictcomp>
name: field.as_marshmallow_field()
File "...\.venv\lib\site-packages\umongo\abstract.py", line 209, in as_marshmallow_field
m_field = m_class(**field_kwargs, metadata=self.metadata)
TypeError: __init__() missing 1 required positional argument: 'constant'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels