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

Avoid error when accessing final voting stats before the balloting phase #3603

Merged
merged 1 commit into from
Jun 11, 2019

Conversation

microweb10
Copy link
Member

References

This is a backport of PR AyuntamientoMadrid#2040

Objectives

When accessing the URL /admin/stats/budget_balloting?budget_id=X for a budget in a phase prior to the balloting phase, the following error was raised due to the stats were not calculated yet. Instead, we'll now show a flash message.

NoMethodError:
  undefined method `[]' for nil:NilClass
    ./app/controllers/admin/stats_controller.rb:82

Visual Changes

Captura de pantalla 2019-06-06 a las 18 15 02

Captura de pantalla 2019-06-06 a las 18 54 16

When accessing the URL `/admin/stats/budget_balloting?budget_id=X'
for a budget in a phase prior to the balloting phase, the following
error was raised due to the stats where not calculated yet.
Instead, we'll now show a flash message.

NoMethodError:
  undefined method `[]' for nil:NilClass
  ./app/controllers/admin/stats_controller.rb:82
@microweb10 microweb10 merged commit c7ea052 into master Jun 11, 2019
@microweb10 microweb10 deleted the admin_stats_before_voting_phase branch June 11, 2019 12:34
@microweb10 microweb10 moved this from Review to Release 1.0.1 in Roadmap Jun 11, 2019
@javierm javierm removed the Budgets label Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Roadmap
  
Release 1.1.0
Development

Successfully merging this pull request may close these issues.

None yet

3 participants