diff --git a/project/04-items-stores-smorest-sqlalchemy/schemas.py b/project/04-items-stores-smorest-sqlalchemy/schemas.py index 2619c4ee..fbdcf3de 100644 --- a/project/04-items-stores-smorest-sqlalchemy/schemas.py +++ b/project/04-items-stores-smorest-sqlalchemy/schemas.py @@ -14,7 +14,7 @@ class PlainStoreSchema(Schema): class ItemSchema(PlainItemSchema): store_id = fields.Int(required=True, load_only=True) - store = fields.Nested(lambda: PlainStoreSchema(), dump_only=True) + store = fields.Nested(PlainStoreSchema(), dump_only=True) class ItemUpdateSchema(Schema): diff --git a/project/05-add-many-to-many/schemas.py b/project/05-add-many-to-many/schemas.py index 7fba5609..99b9c94a 100644 --- a/project/05-add-many-to-many/schemas.py +++ b/project/05-add-many-to-many/schemas.py @@ -19,8 +19,8 @@ class PlainTagSchema(Schema): class ItemSchema(PlainItemSchema): store_id = fields.Int(required=True, load_only=True) - store = fields.Nested(lambda: PlainStoreSchema(), dump_only=True) - tags = fields.List(fields.Nested(lambda: PlainTagSchema()), dump_only=True) + store = fields.Nested(PlainStoreSchema(), dump_only=True) + tags = fields.List(fields.Nested(PlainTagSchema()), dump_only=True) class ItemUpdateSchema(Schema): @@ -30,7 +30,7 @@ class ItemUpdateSchema(Schema): class StoreSchema(PlainStoreSchema): items = fields.List(fields.Nested(PlainItemSchema()), dump_only=True) - tags = fields.List(fields.Nested(lambda: PlainTagSchema()), dump_only=True) + tags = fields.List(fields.Nested(PlainTagSchema()), dump_only=True) class TagSchema(PlainTagSchema):