diff app/controllers/activities_controller.rb @ 1014:e3f78fa30a36 live

Again avoid bombing out when faced with odd events
author Chris Cannam
date Mon, 12 Nov 2012 15:17:47 +0000
parents 066b55d7c053
children bb32da3bea34
line wrap: on
line diff
--- a/app/controllers/activities_controller.rb	Mon Nov 12 14:55:11 2012 +0000
+++ b/app/controllers/activities_controller.rb	Mon Nov 12 15:17:47 2012 +0000
@@ -44,6 +44,8 @@
     if !@institution_name.blank?
       events = events.select do |e|
         e.respond_to?(:event_author) and e.event_author and
+	  e.event_author.respond_to?(:ssamr_user_detail) and
+          !e.event_author.ssamr_user_detail.nil? and
           e.event_author.ssamr_user_detail.institution_name == @institution_name
       end
       if events.empty?