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

Updating a model using through results in 400 error if collection attribute is updated #3946

Closed
AskYous opened this issue Dec 31, 2016 · 3 comments

Comments

@AskYous
Copy link

AskYous commented Dec 31, 2016

Sails version: 0.12.1
Node version: 6.9.2
NPM version: 3.10.9
Operating system: Windows 10


It seems that when two models are related via a many-to-many relationship using the through attribute property, and one of the models is updated via HTTP PUT, having the attribute using the through updated as well, sails throws a 400 error.

I've created a repository that reproduces this error. Please read the README.md file there. This is my repository that reproduces this error:

https://github.com/AskYous/sails-through-error/

@sgress454
Copy link
Member

Hi @AskYous, thanks for posting. This has been patched in Waterline 0.11.8. If you re-install Sails (either globally or for your local project) it should pick up the new Waterline version.

@AskYous
Copy link
Author

AskYous commented Jan 28, 2017

Hello @sgress454, I uninstalled SailsJS globally and locally, but I still experienced the same error. The error on the repository I linked above still gets thrown. Can you please check? My sails version is 0.12.11.

@AskYous
Copy link
Author

AskYous commented Apr 13, 2017

@sgress454 I don't know why but it works now (but wasn't before). Thanks for the update!

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

No branches or pull requests

2 participants