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

Add safety in case getSource was called #33

Merged
merged 1 commit into from
Aug 8, 2016

Conversation

mpchadwick
Copy link
Contributor

Per #32 usesSource() may incorrectly return true if getSource() was previously called on the attribute.

If we didn't get the value the first time around (perhaps due to the getSource issue) we try to fetch again using the mechanics that would be used for attributes without source models.

@Vinai
Copy link
Owner

Vinai commented Aug 5, 2016

Thanks for the PR! The additional check if $value is true would fail for empty strings or strings starting with a "0".
How about changing the check for usesSource() to check if the frontend input is select or multiselect?

Per Vinai#32 usesSource may incorrectly return true if getSource was previously called on the attribute.
@mpchadwick
Copy link
Contributor Author

@Vinai updated per your feedback.

@mpchadwick
Copy link
Contributor Author

@Vinai don't mean to be a pest, but I'm trying to install this on one of our sites, but it won't work until this issue is resolved.

@Vinai
Copy link
Owner

Vinai commented Aug 8, 2016

Thanks for your effort!

@Vinai Vinai merged commit bc034f3 into Vinai:master Aug 8, 2016
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