summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2019-05-04 09:27:23 +0200
committercos <cos>2019-05-04 09:27:23 +0200
commita0a24affd16c41099ce1576bd4fa38894f3ec2c5 (patch)
tree7b7b224c9d5f6c6609e2dffeb5d06569bcfc4a66
parent8605774e163737c5377f05fad7c38b7d27da5df4 (diff)
downloadmat-a0a24affd16c41099ce1576bd4fa38894f3ec2c5.zip
Preserve cooking comment when adding macros
(If I understand the change correctly, it's been uncommitted for quite a while.)
-rwxr-xr-xenergyadder.pl3
1 files changed, 2 insertions, 1 deletions
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";