Avoid error when accessing final votes stats before balloting phase
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
This commit is contained in:
@@ -1417,6 +1417,7 @@ en:
|
||||
level_2_user: Level 2 users
|
||||
proposal_created: Citizen proposals
|
||||
budgets:
|
||||
no_data_before_balloting_phase: "There isn't any data to show before the balloting phase."
|
||||
title: "Participatory Budgets - Participation stats"
|
||||
supporting_phase: Supporting phase
|
||||
balloting_phase: Final voting
|
||||
|
||||
@@ -1416,6 +1416,7 @@ es:
|
||||
level_2_user: Usuarios nivel 2
|
||||
proposal_created: Propuestas Ciudadanas
|
||||
budgets:
|
||||
no_data_before_balloting_phase: "No hay datos que mostrar hasta que la fase de votación no esté abierta."
|
||||
title: "Presupuestos participativos - Estadisticas de participación"
|
||||
supporting_phase: Fase de apoyos
|
||||
balloting_phase: Votación final
|
||||
|
||||
Reference in New Issue
Block a user