Skip to content

Fix initiative edit#7054

Merged
mrcasals merged 1 commit intodevelopfrom
chore/fix-edit-initiative-with-attachments
Feb 10, 2021
Merged

Fix initiative edit#7054
mrcasals merged 1 commit intodevelopfrom
chore/fix-edit-initiative-with-attachments

Conversation

@oriolgual
Copy link
Copy Markdown
Contributor

@oriolgual oriolgual commented Dec 22, 2020

🎩 What? Why?

When editing an initiative from the public side, if there was any validation error and the initiative had attachments an error was raised.

This is because the form is submitting the data as an array of strings with the IDs of the attachments, like ["553", "532"]. When the view tried to render this it crashed becase "532" is a String instead of a Decidim::Attachment

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

Describe the best way to test or validate your PR.

📋 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/.
  • AVOID breaking the continuous integration build.
  • AVOID making significant changes to the overall architecture.

📷 Screenshots

image

♥️ Thank you!

@oriolgual oriolgual changed the title Fix initative edit Fix initiative edit Dec 22, 2020
@oriolgual oriolgual force-pushed the chore/fix-edit-initiative-with-attachments branch from 2b90ee0 to 8ae129e Compare December 22, 2020 15:41
@mrcasals mrcasals added type: fix PRs that implement a fix for a bug module: initiatives labels Feb 10, 2021
@mrcasals mrcasals marked this pull request as ready for review February 10, 2021 08:39
@mrcasals mrcasals merged commit 4976597 into develop Feb 10, 2021
@mrcasals mrcasals deleted the chore/fix-edit-initiative-with-attachments branch February 10, 2021 08:39
ahukkanen added a commit to mainio/decidim that referenced this pull request Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: initiatives 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