Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

CSVlint Statistics returns 500 #366

Open
quadrophobiac opened this issue Sep 6, 2017 · 2 comments
Open

CSVlint Statistics returns 500 #366

quadrophobiac opened this issue Sep 6, 2017 · 2 comments

Comments

@quadrophobiac
Copy link
Contributor

Current Behaviour (for problems)

navigating to http://csvlint.io/statistics.json returns a 500 error, when it should serve JSON of total number of CSVlint validations

@quadrophobiac
Copy link
Contributor Author

Logs return the following

Started GET "/statistics.json" for 141.101.98.229 at 2017-09-06 12:10:30 +0000
Processing by SummaryController#index as JSON
  Rendered summary/index.json.jbuilder (7.3ms)
Completed 500 Internal Server Error in 11ms

ActionView::Template::Error (undefined method `each' for nil:NilClass):
     5:   json.to Validation.last.created_at
     6: end
     7: json.results do
     8:   @summary.states.each do |state, count|
     9:     json.set! state, count
    10:   end
    11: end
  app/views/summary/index.json.jbuilder:8:in `block in _app_views_summary_index_json_jbuilder___1015693147123677908_70273486309400'
  app/views/summary/index.json.jbuilder:7:in `_app_views_summary_index_json_jbuilder___1015693147123677908_70273486309400'

@quadrophobiac
Copy link
Contributor Author

Problem seems to reside in the @summary instance variable set by SummaryController, or the problem may reside in the Mongo Model for Summary.
Test suite is passing so whatever error is currently occurring is not captured by existing coverage

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant