propublica / politwoops_sunlight

Politwoops web front end
Other
44 stars 30 forks source link

System Status doesn't work #17

Closed adieyal closed 10 years ago

adieyal commented 10 years ago

Click on the system status link - e.g. http://localhost:3000/admin/status/, I get the following error:

NoMethodError in Admin/system#status

Showing /politwoops/app/views/admin/system/status.html.erb where line #10 raised:

undefined method `created' for nil:NilClass
Extracted source (around line #10):

7: <% link_to("Refresh", :action => 'status', :controller => 'admin/system') %>
8: 
9: <div class="clear">
10:     Last tweet seen <%= time_ago_in_words( @last_tweet.created ) %> ago.
11: </div>
12: 
13: <ul id="worker-list" class="clear">
Rails.root: /politwoops

Application Trace | Framework Trace | Full Trace
app/views/admin/system/status.html.erb:10:in `_app_views_admin_system_status_html_erb__3631673639269228280_70232052718000'
app/controllers/admin/system_controller.rb:60:in `block (2 levels) in status'
app/controllers/admin/system_controller.rb:59:in `status'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None
dvogel commented 10 years ago

Thanks for finding this. Fixed in 6615d8c39ffc0b2dc1e4a958c23df28c212dba1e.