mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
fixed property helper error
This commit is contained in:
@@ -56,7 +56,7 @@ class FoodPropertyHelper:
|
|||||||
if p.property_type == pt and p.property_amount is not None:
|
if p.property_type == pt and p.property_amount is not None:
|
||||||
has_property_value = True
|
has_property_value = True
|
||||||
for c in conversions:
|
for c in conversions:
|
||||||
if c.unit == i.food.properties_food_unit:
|
if c.unit == i.food.properties_food_unit and i.food.properties_food_amount != 0:
|
||||||
found_property = True
|
found_property = True
|
||||||
computed_properties[pt.id]['total_value'] += (c.amount / i.food.properties_food_amount) * p.property_amount
|
computed_properties[pt.id]['total_value'] += (c.amount / i.food.properties_food_amount) * p.property_amount
|
||||||
computed_properties[pt.id]['food_values'] = self.add_or_create(
|
computed_properties[pt.id]['food_values'] = self.add_or_create(
|
||||||
|
|||||||
Reference in New Issue
Block a user