summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2010-08-18 19:20:28 +0200
committerChristoph Helma <helma@in-silico.ch>2010-08-18 19:20:28 +0200
commit14c968273b8d515261eaff6bef7c2fe7d09592ec (patch)
treef4dd69729ea5cc6909f1937e4080d55f33865bca
parent10c35052df37488960d1f51449e90bfbc4f09e21 (diff)
display of empty predictions fixed
-rw-r--r--lazar.rb3
1 files changed, 2 insertions, 1 deletions
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