Skip to content

Commit

Permalink
Check for nil before using @ems.attr.count
Browse files Browse the repository at this point in the history
  • Loading branch information
bmclaughlin committed Sep 17, 2019
1 parent c1003d7 commit e17a88c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/ems_dashboard_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def format_data(resource, attributes, attr_icon, attr_url, attr_hsh)
:title => attr_hsh[attr],
:count => @ems.send(attr).count,
:href => get_url(resource, @ems_id, attr_url[attr]),
)
) unless @ems.send(attr).nil?
end
attr_data
end
Expand Down

0 comments on commit e17a88c

Please sign in to comment.