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

Make sure that general form errors are rendered if present #3059

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

podliashanyk
Copy link
Contributor

@podliashanyk podliashanyk commented Oct 1, 2024

@stveit discovered that general form errors were not rendered while working on #3058. This PR fixes the issue for #3058 in particular and for forms from #2794 in general.

The template used for rendering general form errors is uncrispyfied, even though it is located in foundation-5 dir.

This PR ensures 1:1 behaviour with crispy forms in NAV, ref https://github.com/django-crispy-forms/django-crispy-forms/blob/baf94397a011b3f15a9899097234caa68b86a65e/crispy_forms/templates/uni_form/display_form.html#L4 which always executes in NAV since form_show_errors is True by default in crispy's FormHelper and we never set it to False in code or context.

As in crispy forms. The template used for rendering general form errors is uncrispyfied, even though it is located in foundation-5 dir.
@podliashanyk podliashanyk requested a review from a team October 1, 2024 11:29
@podliashanyk podliashanyk self-assigned this Oct 1, 2024
Copy link

sonarcloud bot commented Oct 1, 2024

Copy link

github-actions bot commented Oct 1, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 992 0 11.48s
✅ PYTHON ruff 987 0 0.1s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link

github-actions bot commented Oct 1, 2024

Test results

    9 files      9 suites   8m 26s ⏱️
2 136 tests 2 136 ✅ 0 💤 0 ❌
4 011 runs  4 011 ✅ 0 💤 0 ❌

Results for commit 7978f1b.

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.44%. Comparing base (2dae9d3) to head (7978f1b).
Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3059   +/-   ##
=======================================
  Coverage   60.44%   60.44%           
=======================================
  Files         605      605           
  Lines       43828    43828           
  Branches       48       48           
=======================================
  Hits        26494    26494           
  Misses      17322    17322           
  Partials       12       12           

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

Copy link
Contributor

@stveit stveit left a comment

Choose a reason for hiding this comment

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

Nice!

@podliashanyk podliashanyk merged commit a7246a2 into master Oct 2, 2024
13 of 14 checks passed
@podliashanyk podliashanyk deleted the render-form-errors-in-non-crispy-forms branch October 2, 2024 08:50
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