Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
LionSniper opened this issue Dec 6, 2023 · 0 comments

Comments

@LionSniper
Copy link

LionSniper commented Dec 6, 2023

`
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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant