Move where=[] to filters=[]
[arvados.git] / services / api / app / controllers / arvados / v1 / jobs_controller.rb
index 42501d14cd3ff1db2e9d720c719842231ac6fc67..a715d0ef29d8117dea8de020af6084234af2e52d 100644 (file)
@@ -3,8 +3,10 @@ class Arvados::V1::JobsController < ApplicationController
   accept_attribute_as_json :runtime_constraints, Hash
   accept_attribute_as_json :tasks_summary, Hash
   skip_before_filter :find_object_by_uuid, :only => :queue
+  skip_before_filter :render_404_if_no_object, :only => :queue
 
   def index
+    return super unless @where.is_a? Hash
     want_ancestor = @where[:script_version_descends_from]
     if want_ancestor
       # Check for missing commit_ancestor rows, and create them if
@@ -41,6 +43,7 @@ class Arvados::V1::JobsController < ApplicationController
   end
 
   def cancel
+    reload_object_before_update
     @object.update_attributes cancelled_at: Time.now
     show
   end