NoMethodError in Pub#org

Showing /home/lonsea/lonsea/app/views/pub/org.haml where line #70 raised:

undefined method `residences' for nil:NilClass

Extracted source (around line #70):

67
68
69
70
71
72
73
          
- if @org.roles.length < 20
%h2 Network
%img{:src => "/images/_org#{@org.id}.png", :usemap => "#structs", :border => 0}
=raw(Graph.org(@org).force_encoding("utf-8"))
- if session[:user_id] then
.xmllink

Rails.root: /home/lonsea/lonsea

Application Trace | Framework Trace | Full Trace
app/models/graph.rb:166:in `block in org'
app/models/graph.rb:166:in `org'
app/views/pub/org.haml:70:in `_app_views_pub_org_haml__3377148386655128252_70087904677760'

Request

Parameters:

{"id"=>"923"}

Response

Headers:

None