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

fix: alternate formula eval implementation #902

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

ankush
Copy link
Member

@ankush ankush commented Sep 21, 2023

Current frappe.safe_eval transforms code so if you have nested conditions with too much depth then it can hit recursion limit of python.

There's no workaround for this and people need large formulas in some
countries, so this is alternate implementation for that.

Current frappe.safe_eval transforms code so if you have nested
iterations with too much depth then it can hit recursion limit of python.

There's no workaround for this and people need large formulas in some
countries, so this is alternate implementation for that.
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2023

Codecov Report

Merging #902 (68e0399) into develop (ba9ce54) will increase coverage by 0.05%.
The diff coverage is 96.00%.

@@             Coverage Diff             @@
##           develop     #902      +/-   ##
===========================================
+ Coverage    73.07%   73.12%   +0.05%     
===========================================
  Files          195      195              
  Lines        10175    10199      +24     
===========================================
+ Hits          7435     7458      +23     
- Misses        2740     2741       +1     
Files Changed Coverage
hrms/payroll/doctype/salary_slip/salary_slip.py 96.00%

@ankush ankush merged commit cc57210 into frappe:develop Sep 22, 2023
7 checks passed
@ankush ankush deleted the eval branch September 22, 2023 08:47
ruchamahabal added a commit that referenced this pull request Sep 22, 2023
fix: alternate formula eval implementation (backport #902)
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.

3 participants