diff --git a/web/app/controllers/artifacts_controller.rb b/web/app/controllers/artifacts_controller.rb index 80aef5039..b7eeb7776 100644 --- a/web/app/controllers/artifacts_controller.rb +++ b/web/app/controllers/artifacts_controller.rb @@ -10,10 +10,10 @@ class ArtifactsController < ApiController if is_jamblaster # check and see if there is a build just for this JB - clients = ArtifactUpdate.where('product = ? and environment = ?', "JamClient/#{params[:type]}", params[:serialno]).order(:product) + clients = ArtifactUpdate.where('product ilike ? and environment = ?', "JamClient/#{params[:type]}%", params[:serialno]).order(:product) if clients.count == 0 # if not, then fine, give back the default environment - clients = ArtifactUpdate.where('product = ? and environment = ?', "JamClient/#{params[:type]}", ArtifactUpdate::DEFAULT_ENVIRONMENT).order(:product) + clients = ArtifactUpdate.where('product ilike ? and environment = ?', "JamClient/#{params[:type]}%", ArtifactUpdate::DEFAULT_ENVIRONMENT).order(:product) end else clients = ArtifactUpdate.where("product like '%JamClient%' and environment = '#{ArtifactUpdate::DEFAULT_ENVIRONMENT}'").order(:product) @@ -23,7 +23,6 @@ class ArtifactsController < ApiController Jamblaster.bootstrap(params[:serialno]) end - #Parameters: {"serialno"=>"NCA-001-160602-00084", "version"=>"dev-20161120-153542", "type"=>"jamblaster"} #Parameters: {"serialno"=>"NCA-001-160602-00084", "version"=>"dev-20161120-153542", "type"=>"jamblasterclient"}