Skip to content

Do not crash if mandatory fields are blank and registrations are enabled#7634

Merged
mrcasals merged 1 commit intodecidim:developfrom
CodiTramuntana:fix/enabled_registrations_mandatory_fields
Mar 18, 2021
Merged

Do not crash if mandatory fields are blank and registrations are enabled#7634
mrcasals merged 1 commit intodecidim:developfrom
CodiTramuntana:fix/enabled_registrations_mandatory_fields

Conversation

@tramuntanal
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal commented Mar 17, 2021

🎩 What? Why?

Please describe your pull request.
On the meetings registration page, in the admin. There's a crash when registrations are enabled and either available_slots or reserved_slots are blank and the form is submitted.

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

Describe the best way to test or validate your PR.

  1. Edit a meeting and set its "Registration type" to "On this platform". Save
  2. Go to meetings registrations page in the admin
  3. Mark the check "Registrations enabled"
  4. Delete the content of "Available slots for this meeting" and "Reserved slots"
  5. Save
  6. The form is rendered again with error and both fields are marked as "can't be blank"

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • CONSIDER adding a unit test if your PR resolves an issue.
  • ✔️ DO check open PR's to avoid duplicates.
  • ✔️ DO keep pull requests small so they can be easily reviewed.
  • ✔️ DO build locally before pushing.
  • ✔️ DO make sure tests pass.
  • ✔️ DO make sure any new changes are documented in docs/.
  • ✔️ DO add and modify seeds if necessary.
  • ✔️ DO add CHANGELOG upgrade notes if required.
  • ✔️ DO add to GraphQL API if there are new public fields.
  • ✔️ DO add link to MetaDecidim if it's a new feature.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

Please add screenshots of the changes you're proposing
image

♥️ Thank you!

@tramuntanal tramuntanal force-pushed the fix/enabled_registrations_mandatory_fields branch from 23b28b6 to 257d373 Compare March 17, 2021 17:52
@tramuntanal
Copy link
Copy Markdown
Contributor Author

Proposals tests got stuck while setting up the chrome driver. Can you re-run them @mrcasals please?

@mrcasals mrcasals added module: meetings type: fix PRs that implement a fix for a bug labels Mar 18, 2021
@mrcasals mrcasals merged commit 82f9009 into decidim:develop Mar 18, 2021
@mrcasals
Copy link
Copy Markdown
Contributor

@tramuntanal thanks for the bugfix! Could you add a backport to 0.24, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: meetings type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants