[ARVADOS] updated: abdebdb124f9d75afc27df9c0748059ea041164d

Git user git at public.curoverse.com
Thu May 18 15:43:47 EDT 2017


Summary of changes:
 apps/workbench/app/models/container_work_unit.rb          | 8 ++++----
 apps/workbench/app/views/work_units/_show_status.html.erb | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

       via  abdebdb124f9d75afc27df9c0748059ea041164d (commit)
      from  55173b4fc7ab41430db35afd4aac1611716c6584 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit abdebdb124f9d75afc27df9c0748059ea041164d
Author: radhika <radhika at curoverse.com>
Date:   Thu May 18 15:38:52 2017 -0400

    11710: fetching requesting containers

diff --git a/apps/workbench/app/models/container_work_unit.rb b/apps/workbench/app/models/container_work_unit.rb
index 73f2ee3..68f8e30 100644
--- a/apps/workbench/app/models/container_work_unit.rb
+++ b/apps/workbench/app/models/container_work_unit.rb
@@ -22,13 +22,13 @@ class ContainerWorkUnit < ProxyWorkUnit
     items = []
     if container_uuid
       my_children = @child_proxies
-      my_children = ContainerRequest.where(requesting_container_uuid: container_uuid).results if !my_children
-
+      cols = ContainerRequest.columns.map(&:name) - %w(id updated_at mounts)
+      my_children = ContainerRequest.select(cols).where(requesting_container_uuid: container_uuid).results if !my_children
       my_child_containers = my_children.map(&:container_uuid).compact.uniq
       grandchildren = {}
-      my_child_containers.each { |c| grandchildren[c] = []} if my_child_containers
+      my_child_containers.each { |c| grandchildren[c] = []} if my_child_containers.any?
 
-      reqs = ContainerRequest.where(requesting_container_uuid: my_child_containers).results if !my_child_containers
+      reqs = ContainerRequest.select(cols).where(requesting_container_uuid: my_child_containers).results if my_child_containers.any?
       reqs.each {|cr| grandchildren[cr.request_container_uuid] << cr} if reqs
 
       my_children.each do |cr|
diff --git a/apps/workbench/app/views/work_units/_show_status.html.erb b/apps/workbench/app/views/work_units/_show_status.html.erb
index c06e82a..b80d50d 100644
--- a/apps/workbench/app/views/work_units/_show_status.html.erb
+++ b/apps/workbench/app/views/work_units/_show_status.html.erb
@@ -1,7 +1,8 @@
 <%
     container_uuid = if @object.is_a?(Container) then @object.uuid elsif @object.is_a?(ContainerRequest) then @object.container_uuid end
     if container_uuid
-      reqs = ContainerRequest.where(requesting_container_uuid: container_uuid).results
+      cols = ContainerRequest.columns.map(&:name) - %w(id updated_at mounts)
+      reqs = ContainerRequest.select(cols).where(requesting_container_uuid: container_uuid).results
       load_preloaded_objects(reqs)
 
       child_cs = reqs.map(&:requesting_container_uuid).uniq

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list