diff options
author | Christoph Helma <helma@in-silico.ch> | 2011-05-24 12:22:54 +0000 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2011-05-24 12:22:54 +0000 |
commit | 55b4ae338d1e07ac3325521d6f10ca6792d8b46f (patch) | |
tree | 8ceb1d35c5f77bdef710ad0ce16970f94280c848 /application.rb | |
parent | 96d6b6e562128f473b5615fe71ee0409d9d81b03 (diff) |
error message if prediction value nil
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/application.rb b/application.rb index 67a46d1..c49242a 100644 --- a/application.rb +++ b/application.rb @@ -366,6 +366,11 @@ post '/predict/?' do # post chemical name to model :title => model.name, :error => prediction.metadata[OT.error] } + elsif prediction_dataset.value(@compound).nil? + @predictions << { + :title => model.name, + :error => "Not enough similar compounds in training dataset." + } else @predictions << { :title => model.name, |