From e39feddd603b2e9c55b77b612ca88dd5cfb57f9d Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 29 Jun 2018 13:27:50 +0100 Subject: [PATCH] Ignore recipe units when unit set to None --- modules/ORB/System/Recipe.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ORB/System/Recipe.pm b/modules/ORB/System/Recipe.pm index 7b44cf3..55093d0 100644 --- a/modules/ORB/System/Recipe.pm +++ b/modules/ORB/System/Recipe.pm @@ -656,7 +656,8 @@ sub _add_ingredients { my ($unitid, $prepid); - if($ingred -> {"units"}) { + # Set the units, if appropriate (ignore the "None" unit) + if($ingred -> {"units"} && $ingred -> {"units"} ne "None") { $unitid = $self -> {"entities"} -> {"units"} -> get_id($ingred -> {"units"}) or return $self -> self_error("Unable to get unit ID for '".$ingred -> {"units"}."': ".$self -> {"entities"} -> {"units"} -> errstr());