X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/783343e5aca00f730315d943cecf74e4277a38e7..1cf946bc2ac7370431c193463ab865d71bc32ed3:/apps/workbench/app/helpers/application_helper.rb diff --git a/apps/workbench/app/helpers/application_helper.rb b/apps/workbench/app/helpers/application_helper.rb index 66267e028d..d1bac0c4cd 100644 --- a/apps/workbench/app/helpers/application_helper.rb +++ b/apps/workbench/app/helpers/application_helper.rb @@ -100,7 +100,7 @@ module ApplicationHelper else link_name = object_for_dataclass(resource_class, link_uuid).andand.friendly_link_name end - rescue RuntimeError + rescue ArvadosApiClient::NotFoundException # If that lookup failed, the link will too. So don't make one. return attrvalue end @@ -306,7 +306,7 @@ module ApplicationHelper selectables = [] attrtext = attrvalue - if dataclass and dataclass.is_a? Class + if dataclass.is_a? Class and dataclass < ArvadosBase objects = get_n_objects_of_class dataclass, 10 objects.each do |item| items << item @@ -392,7 +392,7 @@ module ApplicationHelper render opts.merge(partial: "application/#{partial}") end end - + def fa_icon_class_for_object object case object.class.to_s.to_sym when :User