src/database/db_product.cpp

changeset 478
a3653722b0d6
parent 458
ac216a75ca9b
child 482
e13763ec829f
--- a/src/database/db_product.cpp	Wed Jan 25 16:17:07 2023 +0100
+++ b/src/database/db_product.cpp	Sat Jan 28 10:36:59 2023 +0100
@@ -249,7 +249,7 @@
     prod->starter_enable = query.value("starter_enable").toInt() ? true:false;
     prod->starter_type = query.value("starter_type").toInt();
     prod->starter_sg = query.value("starter_sg").toDouble();
-    prod->starter_viability = query.value("starter_viability").toInt();
+    prod->starter_viability = query.value("starter_viability").toDouble();
     if (query.value("yeast_prod_date").toString().length() == 10)
 	prod->yeast_prod_date = query.value("yeast_prod_date").toDate();
     else
@@ -835,7 +835,7 @@
     query.bindValue(":starter_enable", prod->starter_enable ? 1:0);
     query.bindValue(":starter_type", prod->starter_type);
     query.bindValue(":starter_sg", round(prod->starter_sg * 1000) / 1000);
-    query.bindValue(":starter_viability", prod->starter_viability);
+    query.bindValue(":starter_viability", round(prod->starter_viability * 10) / 10);
     query.bindValue(":yeast_prod_date", prod->yeast_prod_date);
     query.bindValue(":yeast_pitchrate", round(prod->yeast_pitchrate * 1000) / 1000);
     query.bindValue(":prop1_type", prod->prop_type[0]);

mercurial