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

🔊 [#4927] Add system check for missing allow_blank on non-required charfields #4989

Merged

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented Jan 6, 2025

Closes #4927

Changes

  • Add system check for missing allow_blank on non-required charfields

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how

@stevenbal stevenbal marked this pull request as draft January 6, 2025 15:32
Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.63%. Comparing base (f16d700) to head (ecea971).
Report is 21 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4989   +/-   ##
=======================================
  Coverage   96.62%   96.63%           
=======================================
  Files         761      761           
  Lines       25961    25972   +11     
  Branches     3394     3394           
=======================================
+ Hits        25084    25097   +13     
+ Misses        611      610    -1     
+ Partials      266      265    -1     

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

@stevenbal stevenbal force-pushed the feature/4927-serializer-allow-blank-system-check branch from 8fa38e2 to ff6cc90 Compare January 7, 2025 08:21
@stevenbal stevenbal marked this pull request as ready for review January 7, 2025 10:19
@stevenbal
Copy link
Contributor Author

@sergei-maertens should I write a test for this check?

@sergei-maertens
Copy link
Member

@sergei-maertens should I write a test for this check?

No, I don't think so, So you can # pragma: no cover it :)

src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
@stevenbal stevenbal force-pushed the feature/4927-serializer-allow-blank-system-check branch 3 times, most recently from 1657722 to c615fa9 Compare January 14, 2025 09:36
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
src/openforms/utils/checks.py Outdated Show resolved Hide resolved
@stevenbal stevenbal force-pushed the feature/4927-serializer-allow-blank-system-check branch from c615fa9 to 983192f Compare January 14, 2025 12:43
@stevenbal stevenbal force-pushed the feature/4927-serializer-allow-blank-system-check branch from 983192f to f7e0af3 Compare January 14, 2025 13:08
@stevenbal stevenbal force-pushed the feature/4927-serializer-allow-blank-system-check branch from f7e0af3 to ecea971 Compare January 14, 2025 13:24
@stevenbal
Copy link
Contributor Author

@sergei-maertens CI fails due to https://machtigen.digid.nl being down

@sergei-maertens sergei-maertens merged commit 95b628e into master Jan 14, 2025
33 checks passed
@sergei-maertens sergei-maertens deleted the feature/4927-serializer-allow-blank-system-check branch January 14, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add system check for missing allow_blank=True in specific serializer fields
2 participants