-
-
Notifications
You must be signed in to change notification settings - Fork 38
Add circular reference detection to prevent infinite recursion #199
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
base: main
Are you sure you want to change the base?
Conversation
|
@InzGIBA could you please fix CI errors? |
Yes, of course. I apologize for the delay in fixing the code, but I only just found the time. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
+ Coverage 91.14% 91.19% +0.05%
==========================================
Files 11 11
Lines 700 704 +4
==========================================
+ Hits 638 642 +4
Misses 62 62
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@InzGIBA could you please add a test case too? |
|
Tests added to validate the “__get_nodes_data” function in PR |
name: Pull request
about: Prevent infinite loops by detecting self-referencing nodes
assignees: fabiocaccamo
Describe your changes
Added circular reference detection to prevent infinite recursion when a node references itself as its parent. The validation is implemented in the
__get_nodes_datamethod and checks for cases wherepk == tn_parent_id. When a circular reference is detected, a clearValueErroris raised with the message "Circular reference detected."Related issue
N/A (proactive improvement to prevent a common issue that can cause infinite recursion)
Checklist before requesting a review