[ARVADOS] updated: b436539142666c2553a74363fbf7e34fefc9912b

git at public.curoverse.com git at public.curoverse.com
Thu Feb 13 23:48:55 EST 2014


Summary of changes:
 .../arvados/v1/collections_controller.rb           |   29 +++++++++----------
 services/api/test/fixtures/jobs.yml                |    1 +
 2 files changed, 15 insertions(+), 15 deletions(-)

       via  b436539142666c2553a74363fbf7e34fefc9912b (commit)
      from  876c8e2ada7a9b8d1baf6fc11bd579e6bfad7789 (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 b436539142666c2553a74363fbf7e34fefc9912b
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Feb 13 20:48:40 2014 -0800

    Fix crash in collections.provenance when a script_parameter is a Fixnum.

diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index feed5ce..dc95ea0 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -61,21 +61,20 @@ class Arvados::V1::CollectionsController < ApplicationController
   end
 
   def script_param_edges(visited, sp)
-    if sp and not sp.empty?
-      case sp
-      when Hash
-        sp.each do |k, v|
-          script_param_edges(visited, v)
-        end
-      when Array
-        sp.each do |v|
-          script_param_edges(visited, v)
-        end
-      else
-        m = collection_uuid(sp)
-        if m
-          generate_provenance_edges(visited, m)
-        end
+    case sp
+    when Hash
+      sp.each do |k, v|
+        script_param_edges(visited, v)
+      end
+    when Array
+      sp.each do |v|
+        script_param_edges(visited, v)
+      end
+    when String
+      return if sp.empty?
+      m = collection_uuid(sp)
+      if m
+        generate_provenance_edges(visited, m)
       end
     end
   end
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index 4adf985..9780067 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -95,6 +95,7 @@ barbaz:
   script_version: 7def43a4d3f20789dda4700f703b5514cc3ed250
   script_parameters:
     input: fa7aeb5140e2848d39b416daeef4ffc5+45
+    an_integer: 1
   started_at: <%= 3.minute.ago.to_s(:db) %>
   finished_at: <%= 2.minute.ago.to_s(:db) %>
   running: false

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list