jazzband / django-formtools

A set of high-level abstractions for Django forms
https://django-formtools.readthedocs.io
BSD 3-Clause "New" or "Revised" License
794 stars 135 forks source link

Possible solution for #220 #221

Closed schinckel closed 1 year ago

schinckel commented 1 year ago

This shows a possible approach we can use to fix the infinite recursion that can be triggered by referring to step data from condition_dict callables.

codecov[bot] commented 1 year ago

Codecov Report

Merging #221 (8ec83ab) into master (97441f1) will increase coverage by 0.60%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #221      +/-   ##
==========================================
+ Coverage   93.88%   94.48%   +0.60%     
==========================================
  Files          10       10              
  Lines         523      526       +3     
  Branches       66       68       +2     
==========================================
+ Hits          491      497       +6     
+ Misses         19       18       -1     
+ Partials       13       11       -2     
Impacted Files Coverage Δ
formtools/wizard/views.py 95.34% <100.00%> (+1.05%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

schinckel commented 1 year ago

I'm not tied to this approach, it's just a first suggestion.

This also "fixes" that get_cleaned_data_for_step does not use get_form_list.

claudep commented 1 year ago

Hopefully 604a8ec5488c90c should fix it. Thanks for the patch!