From bf79638d4be227af4ef9ce784859439b8e7749b8 Mon Sep 17 00:00:00 2001 From: tanshu Date: Tue, 15 Mar 2016 16:13:40 +0530 Subject: [PATCH] Fix: Recipe edit never showed is_sold as it was not part of the json --- brewman/views/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brewman/views/recipe.py b/brewman/views/recipe.py index 1ffed8e6..514cf879 100644 --- a/brewman/views/recipe.py +++ b/brewman/views/recipe.py @@ -247,7 +247,7 @@ def recipe_info(id, request): recipe = DBSession.query(Recipe).filter(Recipe.id == id).one() info = {'RecipeID': recipe.id, 'Product': {'ProductID': recipe.product_id, 'Name': recipe.product.name, 'Units': recipe.product.units, - 'SalePrice': recipe.product.sale_price}, + 'SalePrice': recipe.product.sale_price, 'IsSold': recipe.product.is_sold}, 'Quantity': recipe.quantity, 'SalePrice': recipe.sale_price, 'CostPrice': recipe.cost_price, 'ValidFrom': recipe.valid_from.strftime('%d-%b-%Y'), 'ValidTo': recipe.valid_to.strftime('%d-%b-%Y'), 'RecipeItems': []}