Fix crash if item has no name (backported from 1970-folder-view)
authorTom Clegg <tom@curoverse.com>
Fri, 2 May 2014 14:32:52 +0000 (10:32 -0400)
committerTom Clegg <tom@curoverse.com>
Fri, 2 May 2014 14:32:52 +0000 (10:32 -0400)
apps/workbench/app/models/arvados_resource_list.rb

index ba3f0a05bfac9b6336f20b15a9af4807e78647af..329033f582eb4b686075e68e54295758050d38e9 100644 (file)
@@ -158,8 +158,9 @@ class ArvadosResourceList
     end
   end
 
+  # Note: this arbitrarily chooses one of (possibly) multiple names.
   def name_for item_or_uuid
-    links_for(item_or_uuid, 'name').first.name
+    links_for(item_or_uuid, 'name').first.andand.name
   end
 
 end