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 check to handle empty form attributes in general non-crispy template #3140

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

podliashanyk
Copy link
Contributor

Originally mentioned in #3105 (review)

@lunkwill42 har suggested IRL to add the check to the general template.

A general failsafe for #2794

If no form.attrs are set then the standard form fields will be rendered. Works as a failsafe.
@podliashanyk podliashanyk requested a review from a team October 14, 2024 13:36
Copy link

sonarcloud bot commented Oct 14, 2024

@podliashanyk podliashanyk self-assigned this Oct 14, 2024
Copy link

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 992 0 11.18s
✅ PYTHON ruff 987 0 0.09s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

Test results

    6 files      6 suites   4m 11s ⏱️
2 046 tests 2 045 ✅  0 💤 1 ❌
2 873 runs  2 862 ✅ 10 💤 1 ❌

For more details on these failures, see this check.

Results for commit 02e432c.

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.44%. Comparing base (1e9d859) to head (02e432c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3140   +/-   ##
=======================================
  Coverage   60.44%   60.44%           
=======================================
  Files         605      605           
  Lines       43749    43749           
  Branches       48       48           
=======================================
  Hits        26443    26443           
  Misses      17294    17294           
  Partials       12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests fail since we have not added attrs to the management profile form in #3105.

And generally I thought we were moving away from having the catch-all {{ form }} since we will uncrispify all of nav.

If we don't want to have to add attrs to all forms this tactic is not ideal, since it shows that the tests fail even with the fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants