summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2018-10-05 13:20:37 +0000
committergebele <gebele@in-silico.ch>2018-10-05 13:20:37 +0000
commit1d006ce806c4235f9fb48f43db6a2b3004bd7a2b (patch)
tree38f950e3e0d2acc96192b7b3a306353c17ccb40f
parentc5c539276db32706ecbd152f7499a2265d091974 (diff)
fixed mazzatorta warnings in single predictions
-rw-r--r--application.rb2
-rw-r--r--views/prediction.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/application.rb b/application.rb
index e6ca7c2..650f9a1 100644
--- a/application.rb
+++ b/application.rb
@@ -557,7 +557,7 @@ post '/predict/?' do
if prediction["value"]
output["mazzatorta"] = {:mmol_prediction => @compound.mg_to_mmol(prediction["value"].delog10p).signif(3),:prediction => prediction["value"].delog10p.signif(3)}
else
- output["mazzatorta"] << {:warnings => prediction["warnings"][0].split("\t").first}
+ output["mazzatorta"] = {:warnings => prediction["warnings"][0].split("\t").first}
end
@predictions << output
else
diff --git a/views/prediction.haml b/views/prediction.haml
index 152efc9..076ed64 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -159,7 +159,7 @@
%b.title Lowest observed adverse effect level (LOAEL) (Rats) (Mazzatorta)
%p
- hash = mazzatorta["mazzatorta"]
- - unless hash.keys.include?("warnings")
+ - unless hash.keys.include?("warnings") || hash.key?(:warnings)
%b Prediction:
%br
= "#{hash[:mmol_prediction]} (mmol/kg_bw/day)"