summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)"