From 14c968273b8d515261eaff6bef7c2fe7d09592ec Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 18 Aug 2010 19:20:28 +0200 Subject: display of empty predictions fixed --- lazar.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lazar.rb b/lazar.rb index f79b901..eee875a 100644 --- a/lazar.rb +++ b/lazar.rb @@ -318,7 +318,6 @@ post '/:id/?' do # create prediction if cached_prediction = Prediction.first(:model_uri => lazar.uri, :compound_uri => compound_uri) @prediction = YAML.load(cached_prediction.yaml) else - #unless @prediction = YAML.load(Prediction.first(:model_uri => lazar.uri, :compound_uri => compound_uri).yaml) begin # AM: switch here between regression and classification eval "lazar.#{prediction_type}(compound_uri,@prediction,true) unless lazar.database_activity?(compound_uri,@prediction)" @@ -333,6 +332,8 @@ post '/:id/?' do # create prediction @prediction.to_yaml when 'application/rdf+xml' @prediction.to_owl + else + halt 400, "MIME type \"#{request.env['HTTP_ACCEPT']}\" not supported." end elsif dataset_uri -- cgit v1.2.3