# HG changeset patch # User Michiel Broek # Date 1709578139 -3600 # Node ID 1b9e887392aa3acc752bdbf31715ae2f38db1091 # Parent 6922856f4288b056d640693da3311ff911b22e89 Fix export recipe to new product crash diff -r 6922856f4288 -r 1b9e887392aa src/database/db_product.cpp --- a/src/database/db_product.cpp Tue Feb 27 17:32:00 2024 +0100 +++ b/src/database/db_product.cpp Mon Mar 04 19:48:59 2024 +0100 @@ -679,12 +679,8 @@ query.bindValue(":eq_trub_loss", round(prod->eq_trub_loss * 10) / 10); query.bindValue(":eq_evap_rate", round(prod->eq_evap_rate * 100) / 100); query.bindValue(":eq_boil_time", round(prod->eq_boil_time)); - //query.bindValue(":eq_calcboil", prod->eq_calc_boil_volume ? 1:0); query.bindValue(":eq_top_up_kettle", round(prod->eq_top_up_kettle * 10) / 10); - //query.bindValue(":eq_hopfactor", round(prod->eq_hop_utilization)); query.bindValue(":eq_notes", prod->eq_notes); - //query.bindValue(":eq_lauter_volume", round(prod->eq_lauter_volume * 10) / 10); - //query.bindValue(":eq_lauter_height", round(prod->eq_lauter_height * 1000) / 1000); query.bindValue(":eq_lauter_deadspace", round(prod->eq_lauter_deadspace * 10) / 10); query.bindValue(":eq_kettle_volume", round(prod->eq_kettle_volume * 10) / 10); query.bindValue(":eq_kettle_height", round(prod->eq_kettle_height * 1000) / 1000); @@ -992,7 +988,7 @@ obj.insert("y_gr_hl_hi", prod->yeasts.at(i).gr_hl_hi); obj.insert("y_sg_hi", round(prod->yeasts.at(i).sg_hi * 1000) / 1000); obj.insert("y_cost", round(prod->yeasts.at(i).cost * 1000) / 1000); - if (! product->yeasts.at(i).yp_uuid.isNull() && (product->yeasts.at(i).yp_uuid.length() == 36)) { + if (! prod->yeasts.at(i).yp_uuid.isNull() && (prod->yeasts.at(i).yp_uuid.length() == 36)) { // qDebug() << "yeasts_Json append package"; QJsonObject package; package.insert("uuid", prod->yeasts.at(i).yp_uuid); diff -r 6922856f4288 -r 1b9e887392aa src/database/db_recipe.cpp --- a/src/database/db_recipe.cpp Tue Feb 27 17:32:00 2024 +0100 +++ b/src/database/db_recipe.cpp Mon Mar 04 19:48:59 2024 +0100 @@ -273,6 +273,13 @@ y.sg_lo = 1.04; y.gr_hl_hi = 80; y.sg_hi = 1.08; + /* Clear Yeast Package data */ + y.yp_uuid = QString(); + y.yp_package = QString(); + y.yp_cells = 0; + y.yp_viability = 0.99; + y.yp_max = 100; + y.yp_size = 0.01; /* Now get what we have got */ y.name = obj["y_name"].toString(); y.laboratory = obj["y_laboratory"].toString(); diff -r 6922856f4288 -r 1b9e887392aa translations/bmsapp_en.ts --- a/translations/bmsapp_en.ts Tue Feb 27 17:32:00 2024 +0100 +++ b/translations/bmsapp_en.ts Mon Mar 04 19:48:59 2024 +0100 @@ -12481,11 +12481,11 @@ QObject - - + + - - + + Database error @@ -12496,10 +12496,10 @@ - - - - + + + + MySQL error: %1 %2 %3 diff -r 6922856f4288 -r 1b9e887392aa translations/bmsapp_nl.ts --- a/translations/bmsapp_nl.ts Tue Feb 27 17:32:00 2024 +0100 +++ b/translations/bmsapp_nl.ts Mon Mar 04 19:48:59 2024 +0100 @@ -14173,11 +14173,11 @@ - - + + - - + + Database error Database fout @@ -14188,10 +14188,10 @@ MySQL fout: record %1 niet gevonden - - - - + + + + MySQL error: %1 %2 %3