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

Avoid stack level too deep in predicate builder #41393

Closed
wants to merge 1 commit into from

Conversation

afrase
Copy link
Contributor

@afrase afrase commented Feb 10, 2021

Summary

If you have an association with the same name as the foreign key then a SystemStackError: stack level too deep error is raised.

This PR addresses the issue by checking if the query variable is different from attributes argument before recursively calling expand_from_hash. We have been running this fix in production for a number of years without issue at the company I work for.

This issue has been mentioned in a number of issues #26778, #34869, #31110.

Other Information

Something to note is the setter for the association can raise errors. I have another branch that fixes that but I'm not sure if using an association extension is the best way to handle it.

Thanks

Check if the query is different from attributes before recursively
calling `expand_from_hash`
@afrase
Copy link
Contributor Author

afrase commented Feb 10, 2021

Closing in favor of #41394

@afrase afrase closed this Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant