summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmat3
1 files changed, 3 insertions, 0 deletions
diff --git a/mat b/mat
index 77d79dd..6a1a72e 100755
--- a/mat
+++ b/mat
@@ -663,6 +663,9 @@ sub cmd_shoppinglist {
for my $recipe (@shop_recipes) {
# my $contents = $db->selectall_arrayref("SELECT * FROM contents WHERE recipe_id=".$recipe.";");
my $contents = $db->selectall_hashref("SELECT * FROM contents WHERE recipe_id=".$recipe.";", 'ingredient_id');
+ unless (%$contents) {
+ print "WARNING recipe $recipe contains no ingredients!\n";
+ }
for my $content ( keys(%$contents)) {
# print %$contents, "\n";
my $ingredientcol = $db->selectcol_arrayref("SELECT name FROM ingredients WHERE id=".$content.";");