Skip to content

Fix boolean fields for .reported? and .hidden? which is nil if no report exists#7990

Merged
leio10 merged 1 commit intodecidim:developfrom
i-need-another-coffee:ale-fix-reportable-behaviour
May 25, 2021
Merged

Fix boolean fields for .reported? and .hidden? which is nil if no report exists#7990
leio10 merged 1 commit intodecidim:developfrom
i-need-another-coffee:ale-fix-reportable-behaviour

Conversation

@alecslupu
Copy link
Copy Markdown
Contributor

🎩 What? Why?

If there is no report record exists on database, the reported? and hidden? methods on the Reportable behavior return nil. This PR is making sure the function always return a boolean value. This may be useful for API, or any json export that may happen.

📌 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/.
  • ✔️ 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
Description

♥️ Thank you!

@mrcasals
Copy link
Copy Markdown
Contributor

@alecslupu tests seem to fail related to yesterday's PR, could you rebase/update with latest develop please?

@alecslupu alecslupu force-pushed the ale-fix-reportable-behaviour branch from a5b251d to bd514fe Compare May 11, 2021 11:08
@alecslupu
Copy link
Copy Markdown
Contributor Author

@mrcasals all green

@leio10 leio10 added in-review type: fix PRs that implement a fix for a bug module: core labels May 25, 2021
@leio10 leio10 merged commit c3cb2a1 into decidim:develop May 25, 2021
entantoencuanto added a commit that referenced this pull request May 31, 2021
* develop: (59 commits)
  Update supported versions in docs (#8079)
  Meetings merge minutes and close actions (#7968)
  Meeting calendars providers (#7944)
  Fix broken test on meetings after merging PR without rebase (#8076)
  Show participants list in meetings (#7933)
  Security feature external link warning (#7397)
  Add missing tests for scope types admin page (#8053)
  Use symbols for polymorphic route arguments (#8052)
  Mockup design for Participation statistics tables in Votings (#7879)
  Fix boolean fields for .reported? and .hidden? which is nil if no report exists (#7990)
  Fix redirects broken by Terms and Conditions redirect (#8036)
  Amend CSS overwritting (#8007)
  New Crowdin updates (#8048)
  Fix undetected broken tests because of missing dependencies (#8050)
  Validate results by Monitoring Committee Members (#7899)
  Electoral certificate validation by Monitoring Committee Members (#7871)
  Publish and unpublish a meeting (#7893)
  New Crowdin updates (#8005)
  Polling station closure attach the physical electoral closure certificate (#7929)
  Fix attachment title migration generating possibly invalid values (#8020)
  ...
leio10 pushed a commit that referenced this pull request May 31, 2021
leio10 added a commit that referenced this pull request May 31, 2021
…ort exists (#7990) (#8082)

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
@alecslupu alecslupu deleted the ale-fix-reportable-behaviour branch June 18, 2021 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-review module: core type: fix PRs that implement a fix for a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants