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

update a non-existent field in instance when updating this instance #501

Open
beaulian opened this issue Mar 24, 2023 · 1 comment
Open
Labels

Comments

@beaulian
Copy link

beaulian commented Mar 24, 2023

Hi,

According to the following code, when we update an instance, whatever we define other fields (not in the Model) in the Schema, these fields will be inserted to the instance, is it a bug?

if instance is not None:
for key, value in data.items():
setattr(instance, key, value)
return instance

Thanks

@lafrech
Copy link
Member

lafrech commented Mar 24, 2023

I would say it is a bug in client code.

Should this lib actively try to catch this?

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

No branches or pull requests

2 participants