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 module recreates the rows of the intermediate table #209

Open
raagin opened this issue Apr 26, 2023 · 1 comment
Open

The module recreates the rows of the intermediate table #209

raagin opened this issue Apr 26, 2023 · 1 comment

Comments

@raagin
Copy link
Contributor

raagin commented Apr 26, 2023

When I save an instance with SortedManyToManyField, rows of the intermediate table with selected values are re-created not updated. Even when no changes are made. Is this required behavior?

@AlanCoding
Copy link
Contributor

Saving an instance should never do anything with any related ManyToManyField fields of any sub-types. If we're in the example testapp...

https://github.com/jazzband/django-sortedm2m/blob/master/example/testapp/models.py

Changing the plate field of a Car instance, and calling .save() on that car, for example, shouldn't affect the parking areas it is in (or has a parking permit for, interpretation unclear). It would be helpful if you could clarify what you're saying with some code.

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

2 participants