Skip to content

The function decorated by the "post_load" decorator will undergo changes in parameter types as the function name changes. #276

@LionSniper

Description

@LionSniper

`
class AdGroupUpsertSchemaV3(ma.SQLAlchemySchema):
name = fields.String(required=True)

class Meta:
    model = models.AdGroup
    fields = 'name'
    load_instance = True

@post_load
def a(self, data, *args, **kwargs):
    print(type(data))
    return data

`

flask-marshmallow==0.14.0
marshmallow==3.17.0
marshmallow-sqlalchemy==0.28.1

like the code above,when post_load decorator func name is a-m, data type is dict, when func name is n-z, data type is <class 'modules.advertising.group.models.AdGroup'>

why why why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions