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

fix #45: on saveAll() first delete removed models, then save the rest #46

Merged
merged 1 commit into from
Sep 27, 2017
Merged

fix #45: on saveAll() first delete removed models, then save the rest #46

merged 1 commit into from
Sep 27, 2017

Conversation

cronfy
Copy link
Contributor

@cronfy cronfy commented Sep 27, 2017

This PR rearranges order of operations in saveAll(): first we delete unneeded models, and then save the others.

@cronfy
Copy link
Contributor Author

cronfy commented Sep 27, 2017

please create pull request..

Done.

so i should delete first then save related models right?

Yes, to avoid database constraint violations (e.g. unique index).

@mootensai
Copy link
Owner

Have you tried this PR? Here's what I got from scrutinizer
image

@cronfy
Copy link
Contributor Author

cronfy commented Sep 27, 2017

Hmm, I see it should report same issue on original code from master. It is not changed in the PR. Maybe this is another unrelated bug.

@cronfy
Copy link
Contributor Author

cronfy commented Sep 27, 2017

This PR is working on my site, I see no issues.

@mootensai
Copy link
Owner

ok then.. thanks!

@mootensai mootensai merged commit f30bad6 into mootensai:master Sep 27, 2017
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

Successfully merging this pull request may close these issues.

2 participants