-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Overwriting one attribute deletes foreign key data in v1.14 #439
Comments
Hi @amureki - awesome that was fast! I checked out your branch and am trying to build the case so I can reproduce it. |
Ok, I tried to reproduce it as closely as possible but failed. The error occurs in a |
I debugged the issue. In Seems quite obvious but I have no idea why I didn't manage to reproduce this with your test suite 😅 |
@GitRon thanks for the debug! I suspect ff6b8ee to be the issue. May I ask you to install the library with pinned version of c22808b (commit before the one I am suspecting) and run your failing test? python -m pip install 'model_bakery @ git+https://github.com/model-bakers/model_bakery@c22808b8f2dde283f60ecddcccb3a2f979de9565' If so, I will revert the change and will release the new version ASAP. Best, |
Hi @amureki - you make it so easy to help you! Thx a lot for the pip command, would have had to google for it ❤️ I tried it two times and in both cases, the latest version crashed three tests and the pinned one worked. Best from Cologne |
Awesome! Are you going to release a bugfix release then as well? |
@GitRon yup, later today will be live. :) |
Awesome! ❤️ |
- Add Python 3.12 support - Revert erroneous optimisation of related logic (fix #439) - Bring tox back
Great! 🚀 I'll try it out immediately. |
Describe the issue
When overwriting values of a related model, all other data set by the recipe are being reset/not set at all.
To Reproduce
I have a recipe for a model:
And a relationship:
This works:
This doesn't:
I downgraded to v1.13.0, then it works. Using 1.14.0, it doesn't.
Versions
The text was updated successfully, but these errors were encountered: