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

belongsTo not properly emptying when set to null #315

Closed
nickschot opened this issue Sep 8, 2018 · 8 comments · Fixed by #318
Closed

belongsTo not properly emptying when set to null #315

nickschot opened this issue Sep 8, 2018 · 8 comments · Fixed by #318

Comments

@nickschot
Copy link

nickschot commented Sep 8, 2018

Version

1.5.0

Test Case

#314

Steps to reproduce

I first spotted this in a changeset powered ember-bootstrap form w/ a power-select for (re)setting a belongsTo relationship. Works fine on 1.3.0.

Expected Behavior

The relationship is emptied properly.

Actual Behavior

It is not emptied :(

@nickschot
Copy link
Author

This was referenced Sep 11, 2018
@nickschot
Copy link
Author

@snewcomer is there a need to relay anyway if the new value is not an object (mainly null)?

@urbany
Copy link

urbany commented Sep 27, 2018

Hi, I'm on 1.3.0 and want to update to 1.5.0, is it possible to make a release with this fix? Thanks in advance!

@nickschot
Copy link
Author

@snewcomer this seems to have broken again for me on 1.6.0 even though the PR #318 is in that release.

@snewcomer
Copy link
Collaborator

What release did it last work in?

@nickschot
Copy link
Author

1.3, it seems #318 also didn't fix this exact issue as the section of code that's triggered is above that (see a couple comments back). I think the problem is that it only checks if the original is an object and then returns the relay, while the true value is now null as it's an empty relationship.

@nickschot
Copy link
Author

I have not checked its status in the 2.0 beta which I just noticed exists on a branch. Might be different there if its not using relay anymore.

@snewcomer
Copy link
Collaborator

I’m guessing this is fixed now as of 2.0z. I’ll close for now but feel free to reopen!

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 a pull request may close this issue.

3 participants