You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding 0 grams of an ingredient component to a recipe (possible with the api), causes that recipe to be unviewable. The program attempts to calculate the weight of the component at recipes/models.py/Component:334
if self.of_ingredient:
weight = self.weight or self.of_ingredient.serving * self.servings
But 0 is considered false, so it goes to calculate self.of_ingredient.serving * self.servings, which is (NoneType or DecimalType) * NoneType, and NoneType does not have a multiplication operator defined.
The text was updated successfully, but these errors were encountered:
Adding 0 grams of an ingredient component to a recipe (possible with the api), causes that recipe to be unviewable. The program attempts to calculate the weight of the component at recipes/models.py/Component:334
But 0 is considered false, so it goes to calculate self.of_ingredient.serving * self.servings, which is (NoneType or DecimalType) * NoneType, and NoneType does not have a multiplication operator defined.
The text was updated successfully, but these errors were encountered: