From a0a24affd16c41099ce1576bd4fa38894f3ec2c5 Mon Sep 17 00:00:00 2001 From: cos Date: Sat, 4 May 2019 09:27:23 +0200 Subject: Preserve cooking comment when adding macros (If I understand the change correctly, it's been uncommitted for quite a while.) --- energyadder.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/energyadder.pl b/energyadder.pl index 501a04b..20f1c3f 100755 --- a/energyadder.pl +++ b/energyadder.pl @@ -139,7 +139,8 @@ print $portions, " matlådor på ", int($total_food_weight/$portions), " g ger " print "\n"; my $database_path = (split(":", $Config{'database'}))[2]; -add_to_cooking($recipe_id, $database_path, $specific_energy, $proteins, $carbs, $fats); +add_to_cooking($recipe_id, $database_path, $specific_energy, $proteins, $carbs, + $fats, $cooking->{'cooking_comment'}); print "echo \"INSERT INTO cookings VALUES ($recipe_id, '". DateTime->now()->ymd()."', ".int($specific_energy+0.5)."); \" | sqlite3 ". $database_path."\n"; -- cgit v1.2.3